1
Rather than trying to output the whole labels list directly as a Javascript array, it may be better to build a Javascript array from the list:
var data = {
labels: [{% for label in labels %}"{{ label }}", {% endfor %}],
...
0
You have to use safe
template filter.
safe
marks a string as not requiring further HTML escaping prior to output.
Example:
{{ labels|safe }}
- Chartjs-How to distribute the y-ticks proportionally in Chart.js in Flask app?
- Chartjs-Change color of X axis values to multi color values – Chart.js
0
thank you for your suggestion.
I just converted from
python 2.7 to python 3.7
It works perfectly fine.
- Chartjs-Chartisan/Laravel – > "Call to undefined method" error
- Chartjs-ChartJS – tooltip of one element is covering point that user should be able to select
Source:stackexchange.com