[Answer]-Javascript Pie Chart in Django App – Problems displaying dynamic data

1πŸ‘

βœ…

I think the problem is at

{ label: "Literature",  data: None},

None is not a valid js expression

Edit: To avoid the None problema you should have something like this at your template:

{ label: "{{ cat }}",  data: {% if count %} {{ count }}} {% else %} 0 {% endif %},
πŸ‘€atc

Leave a comment