leandro_r_s
Posts: 3
Joined: Thu Jun 29, 2017 5:15 pm

Option to force chart to set extremes and automatically include the plotLines

Hi,

I would like to see if exists a option automatically include the plotlines into the axis min and max without having to use the setExtremes event.

Example: http://jsfiddle.net/xrqnvy39/1/

Notice that the plotLine is set but does not display because the max of the chart is 10 and the plotLine value is 60.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Option to force chart to set extremes and automatically include the plotLines

Hi leandro_r_s,

Thanks for contacting us with your question.

There is no such option in our API, but you can use load event to iterate over existing plotLines to adjust the extremes.
Demo: http://jsfiddle.net/BlackLabel/2vL4akds/
API reference: https://api.highcharts.com/class-refere ... etExtremes,
https://api.highcharts.com/highcharts/chart.events.load

Let me know if it was what you were looking for.
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”