Some googling might get you there, but I think the chartjs documentation should get you most of the way there.
I would suggest an ajax approach - some js code on your page to retrieve the data from an API you build (a django view). You could also use DRF for this, but DRF is overkill - you can respond with JSON or XML without it. It might be able to render statically also, or even provide the data to a template context - depends a lot on expected environment. Just remember that you can generate javascript in <script> tags within a html django template. On 9 January 2021 at 06:08:02, Dhruvil Shah (sdhruvi...@gmail.com<mailto:sdhruvi...@gmail.com>) wrote: Basically I want to use 'chartjs' for display "Clustered Bar chart", with following things year wise Total amount Amount Received Amount Left I want to fetch data from data base and display it on chart, I have saved data of all above field 3 fields in one table for each date and I want to also fetch year from Datefield. So, basically can anyone give me any resource or something for such type of requirement. Main things is how to display Clustered bar chart by fetching data from database for each year. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADsP_iwqys-XhALXm2CwGV20%2B9XXfRaD6TkASUBvE9COYzg_Qw%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CADsP_iwqys-XhALXm2CwGV20%2B9XXfRaD6TkASUBvE9COYzg_Qw%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/etPan.5ff90d53.6d936ebc.3ac%40uniquode.io.