1๐
OK, I found the answer was to use escapejs:
text: '{{ chart_row.heading_2|escapejs }}'
From the doc: Django built-in template tags
0๐
Try rendering the title as safe.
options: {
title: {
display: true,
text: '{{ chart_row.heading_2|safe }}'
}
}
- [Chartjs]-Chart.js โ Connect two datasets in a line chart at same y value
- [Chartjs]-How to use chart.js in Angular2?
Source:stackexchange.com