You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tracked this down to series.init (series._i = chartSeries.length - 1;) which sets the series sorting index to the length of the series, however this doesn't account for other series which already had a sorting index set above the chartSeries.length.
I also noted while trying to come up with a workaround that series.update() overrides series.options.index with series.index if no new index is provided in the update which seems weird and wrong.
Expected behaviour
Adding a new series should always add it as the last series unless an index is specified.
Actual behaviour
Adding a new series works as expected until existing series are deleted to create gaps/holes in the saved sort indices.
Regarding your comment on series.update(), perhaps we should add a check for existing index option:
// Do the merge, with some forced optionsnewOptions=merge(oldOptions,{animation: false,index: pick(oldOptions.index,this.index),// <= changed herepointStart: this.xData[0]// when updating after addPoint},{data: this.options.data},newOptions);
I tracked this down to series.init (series._i = chartSeries.length - 1;) which sets the series sorting index to the length of the series, however this doesn't account for other series which already had a sorting index set above the chartSeries.length.
I also noted while trying to come up with a workaround that series.update() overrides series.options.index with series.index if no new index is provided in the update which seems weird and wrong.
Expected behaviour
Adding a new series should always add it as the last series unless an index is specified.
Actual behaviour
Adding a new series works as expected until existing series are deleted to create gaps/holes in the saved sort indices.
Live demo with steps to reproduce
http://jsfiddle.net/a9pnwwjp/2/
Affected browser(s)
Chrome
The text was updated successfully, but these errors were encountered: