cullsin
Posts: 25
Joined: Thu May 05, 2022 4:31 pm

help me drawing this chart / Variation in Threshold Line

Hi,

Can you please suggest to me how to draw this chart? It has a variation in the threshold line. I have attached a sample chart.

Thanks,
Raja K
Attachments
excersie-2.png
excersie-2.png (85.81 KiB) Viewed 219 times
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: help me drawing this chart / Variation in Threshold Line

Hi Raja K!

It seems that there is a similar topic with a solution:
viewtopic.php?f=9&t=48529

Please take a look at it and let me know if it was what you were looking for.

Regards!
Hubert Kozik
Highcharts Developer
cullsin
Posts: 25
Joined: Thu May 05, 2022 4:31 pm

Re: help me drawing this chart / Variation in Threshold Line

Hi,

Thanks. I got the solution. One more thing is the color variation above and below the threshold line.
Can you please suggest an example of that?

Thanks,
Raja K
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: help me drawing this chart / Variation in Threshold Line

Hello Raja K!

It is not so easy to create the color variation above and below the 'broken' threshold line. You should find the intersection points between the series and then use zones to add a proper color to part of the series, according to the logic of finding intersection points you should use a different zoneAxis. You can see it in the demo below. It works well with type: 'line', but it is problematic with splines because mathematics is much more complicated. You can try to implement a function to calculate intersection points for spline type. Here is a similar topic: viewtopic.php?t=42935

Demo: https://jsfiddle.net/BlackLabel/a4hLqywt/
API Reference: https://api.highcharts.com/highcharts/series.line.zones
https://api.highcharts.com/highcharts/s ... e.zoneAxis

Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”