0👍
The problem with your rply
JSON string is that you need to wrap your keys with "
because JSON.parse(..)
expects a valid JSON format which requires double quotes.
You can see a brief explanation in w3schools – JSON syntax
JSON names require double quotes. JavaScript names don’t.
Here you can find a way to convert your string into a valid JSON format.
- Chartjs-Can't get if else statement in tooltip label to work in chartjs
- Chartjs-Chart.js: How to display object data types on line graph correctly?
Source:stackexchange.com