score:2

Accepted answer

Could you build the chart inside the callback function instead of defining all the options first? Maybe try something like this:

$.getJSON('values.php', function (json) {

        $('#container').highcharts({
            series: [{
              data: json
            ]},
            title: {
              text: 'Some Title'
            },
            subtitle: ...

I can't demo the ajax request but if you put that json straight in the data option, the charts renders like this: jsfiddle


Related Articles