Chartjs-How to loop over Chart.js with Django list view

0👍

This was solved by including the JavaScript in the main block content and dynamically naming the gauge elements themselves.

var func_name = "container-{{forloop.counter}}"; 
func_name = new Donut(gauge1).setOptions(opts);

I posted a full example to a similar problem here Chart JS and Django loop

Leave a comment