How to get Series's id? In the API there is only name and data etc. But don't have id. How could I get id from series?
I'm using the following way to loop all series in chart.
$(chart.series).each(function(i, serie){
// Want to get serie's id
});
EDIT:
I found i can get id using the follow way. I'm not sure is it the right way?
$(chart.series).each(function(i, serie){
console.log(serie.options.id);
});
If you know the id of series already you can get a reference to the series by
chart.get(ID)
If you want to loop through all the series and list all the IDs of series, do this:
$(chart.series).each(function(i, serie){console.log(serie.options.id)})
FIddle : http://jsfiddle.net/NaK9D/2/
From the documentation:
Another way to reference the series programmatically is by id. Add an id in the series configuration options, and get the series object by chart.get(id).
Looks like you can do:
$(chart.series).each(function(i, serie){
this.get(id);
});