• Coding
  • Highcharts - loading data into a donut pie

Hey,

So, I've been displaying some data using http://www.highcharts.com/.
I am using Regular pie : http://www.highcharts.com/demo/pie-basic and donuts http://www.highcharts.com/demo/pie-donut

But the thing is:
- I can get a regular pie to import from csv
- I can get a donut pie to display

But I am having trouble importing a csv and displaying it in a donut.

Here is my jsfiddle for the pie http://jsfiddle.net/mireilleraad/Kvscf/1/
Here is my jsfiddle for the regular pie using csv data : http://pastebin.com/UQ0rksZx
csv data format:
fieldname, value

all i need to do as add csv import to the donut pie.

Many thanks for anyone willing/can give some help.

Let me know if you have worked with Highcharts before and your thoughts around it as well.

Cheers :)
I have never worked with HighCharts before but just noticed something which is that you're creating the chart twice once before the Ajax call with the dummy data and the other time after the Ajax call. What most probably HighCharts isn't doing is modify the DOM of the initial chart after the ajax request with the new data afterall you're creating a new new instance of HighCharts and assigning it to the chart variable after the ajax call.

So here is a suggestion you could try, how about you no more create any chart before the Ajax callback and wait for the data to be returned from the server, only then create the chart. i.e. var chart = new Highcharts.Chart(optionsPie);