score:2
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.
Source: stackoverflow.com
Related Query
- Call addSeries() from within addSeries event
- Call a function from within highchart click event in reactjs
- Access props and state of current component in React JS within an event handler
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- How can i call a Rest API from a Vue component?
- How to call typescript function inside High chart click event
- How to catch the click event from the axis ticks jqplot, highcharts,flot
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- Formatting JSON from a Pandas data frame for Highcharts within a Django template
- Preventing event from executing consecutive times React
- Dynamically set click event on bar from highcharts graph
- How can I pass values from Highcharts event callbacks (click, mouseOver, mouseOut) back to React component member function?
- Highcharts + set event click from options in jquery
- Http call from a service inside a directive controller
- Highchart, edit data from function call with arguments
- Extracting data from a JSON call to a Postgres table for use in Highcharts (without PHP)
- passing json values to highcharts from .net code behind
- How to call User Control from one of the Javascript function?
- Highcharts + Angularjs : Graph doesn't redraw when adding series from an external event
- change VueJS component data value from inside Highchart event
- "TypeError: c.slice is not a function" when trying to call a function within JQuery
- Highcharts access drilldown data from event click
- Calling Typescript function from Highcharts load event
- How to call Highcharts tooltip formatter function from outside the config object?
- Conditions within highcharts code
- Strange character in the Highstock source code
- I am using click event to trigger a new page to generate the drill down data from highcharts however the entire chart is being generated
- Why does my Highchart look different when I transfer my code from Jsfiddle to my server?
- How to get region/province code from IP address
More Query from same tag
- Get max value and label in series after zoom in JS HighCharts
- Highcharts x-axis tick starts with an offset
- Pass a varible as input to Date.UTC
- R highcharter - adding total in tooltip
- Multiple y-axes in shiny app w/ highcharter
- how to set the interval of points if I have 2 Y axes
- difference between 'stackLabels' and 'dataLabels' in highcharts
- How do I toggle off some specified series by default in HighChart?
- Change X axis label on Drill Down using HighCharts
- Angular dynamic highchart integration - response is not updating in the chart component
- Highcharts series click event not firing on first click
- Strange behaviour of new mysql json selection syntax with Laravel
- How we change the rangeSelector in HighCharts
- Loading data to Highchart from MySQL and displaying in appropriate way
- Highcharts Line Charts Out of memory
- HighCharts - Don't show line or change line style if date not reached
- In semi-overlapped bubble hide behind bubble content upto hidden part in Highcharts
- Highcharts - Show Year label in x-axis on change
- Is there any possible way to make Bar of Pie in Highcharts?
- Disable hover on HighCharts
- highchart line chart last null value is not conected with line
- How to show additional data in tooltip of PIE Chart-Highcharts
- Highcharts - how to color spider chart areas by group value
- Highcharts same scale steps (equal tick interval) on x and y axis
- Highcharts one input of the three not working
- Which chart type should display following chart? gauge or column?
- Javascript HighCharts Pie color change not working
- Highcharts problems showing last values and close values
- Remove border from multiple plots of Stacked and Grouped Column chart (Highcharts.js)
- What is the name of the Highcharts type interface that provides series types?