Chartjs-ChartJS Add data from string

0👍

I had to change my c# code to:

Data = "{ "value": "100", "color": "#00a65a", "highlight": "#00a65a", "label": "IE" } ";

I needed to quote everything, and it wasnt working with \" , i needed to put &quot

And with JSON converted it to an object:

var PieData = JSON.parse(token2);

I’m not really sure if this is the best solution, but it’s working for now.

Leave a comment