Reputation: 921
I am trying to get the series data from a Highcharts chart once it has been called and loaded to the page.
So far I've only been successful in getting a bunch of strings that isn't what I am after obviously. Wonder if someone can help me with this one.
jQuery Code:
success: function (chartData) {
if(chart != undefined) {
$('#meterloader').hide();
$.each(chart.series[0], function(value) {
alert(value);
});
} else {
$('#meterloader').hide();
$('#meterbox').html("<div><p class='textcentre bold red'>There was an error loading the chart.</p></div>");
}
}
Thanks in advance.
Upvotes: 13
Views: 28440
Reputation: 4776
you need plotted data from the chart, then try
chart.series[0].data
if you need all the options from series then try
chart.series
this will return the entire series structure of the chart.
I hope this is useful for you.
Upvotes: 30