Reputation: 196
Is there a way to determine the number of data points in each series of a Highcharts chart?
Upvotes: 4
Views: 5446
Reputation: 174
Using jQuery and assuming you've defined the chart as a variable named chart
...
$.each(
chart.series,
function(){
console.log(this.name + ": " + this.data.length + " data points.");
}
);
Upvotes: 2
Reputation: 26320
Assuming that you want to get from the first serie.
console.log(chart.series[0].data.length);
Upvotes: 4