jeanfloriani
Posts: 25
Joined: Mon Jul 22, 2019 4:11 pm

Timeline with an average dash line

Hi,
I tried to build the following timeline with an average line on it but had no success and found no example on documentation neither on forum.
Can you help please?
Thank you.
Jean
Attachments
Static1LineAverageOnly.jpg
Static1LineAverageOnly.jpg (25.14 KiB) Viewed 270 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Timeline with an average dash line

Hi jeanfloriani,

Thanks for contacting us with your question.

Please provide me with a live demo showing what you have achieved so far. You can start here:
https://jsfiddle.net/BlackLabel/Lcf36abd/

Looking at the attached image I can tell that there are two series and to create such chart you would need two sets of data, one for timeline and second one with average values for that dashed line in the middle. Highcharts doesn't calculate it automatically.

Regards!
Mateusz Bernacik
Highcharts Developer
jeanfloriani
Posts: 25
Joined: Mon Jul 22, 2019 4:11 pm

Re: Timeline with an average dash line

Hello Mateusz,
Thanks a lot for your answer!
Please let me share what I could do:
https://jsfiddle.net/jeanfloriani/xfu9tkz3/1/
*But I don't want range, I need a line chart like the shared screenshot.

Another example of the line is below:
https://jsfiddle.net/jeanfloriani/2e0738xq/3/
**It would be like this but with an average dash line across the blue chart.

Thanks for your support.
Best,
Jean
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Timeline with an average dash line

Hi jeanfloriani,

As I said in my previous post, you need to have two sets of data where one consists of average values. You need to calculate them on your own because Highcharts doesn't do that for you.
Demo: https://jsfiddle.net/BlackLabel/2mbrx13z/

Let me know if you have any further questions!
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”