jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

highstock chart with area and line chart combination

i need to create similar chart.. where i would need multiple threshold value. how can i achieve that ?
image (1).png
image (1).png (55.81 KiB) Viewed 387 times
Thanks
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: highstock chart with area and line chart combination

Hello jahnvi25,
We appreciate you reaching out to us!

To create a chart like you requested you can add the same data to three series, the first is a type of line, second and third are a type of area. Then in area series, you can set a threshold with your preferences, one for the bottom part of your chart and the second for the top part. You should set negativeColor and color properties also to see properly colors on your chart. plotLines should be set with the same values as the thresholds.

Demo: https://jsfiddle.net/BlackLabel/xwfbaetm/
API reference: https://api.highcharts.com/highcharts/s ... ativeColor
https://api.highcharts.com/highcharts/series.area.color
https://api.highcharts.com/highcharts/yAxis.plotLines

Let me know if that was what you were looking for!
Best regards!
Hubert Kozik
Highcharts Developer
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: highstock chart with area and line chart combination

Thanks a lot for this trick.. This is very helpful trick
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: highstock chart with area and line chart combination

That's great to hear! In case of any further questions, feel free to contact us again.
Hubert Kozik
Highcharts Developer

Return to “Highcharts Stock”