score:2

Accepted answer

Solution is to store addSeries on load event, and use stored function when adding series. Live example: http://jsfiddle.net/3bQne/808/

        events: {
            load: function (event) {
                foo = this.addSeries;
            },
            addSeries: function (event) {
                if (iterator) {
                    iterator--;
                    foo.call(this, {
                        data: [100, 200, 100, 100, 200, 300]
                    });
                }

            }
        },

score:0

Still you can stick with plotLine only. If the position of the line is static that is the best way.

If the position is dynamic then you can still go with plotLine. There are events for adding and removing plotLine on the fly.

API link removePLotLine() : http://api.highcharts.com/highcharts#Axis.removePlotLine addPlotLine() : http://api.highcharts.com/highcharts#Axis.addPlotLine

I hope this will help you.


Related Query

More Query from same tag