Tomas
Posts: 13
Joined: Sat Jan 16, 2021 3:52 pm

How to have a continous graph?

Dear Highchart Team,

following chart is showing a graph:
https://jsfiddle.net/Body007/7jhqwnxr/

But unfortunately there are lines which i would like to exclude.
So that you can see a continous graph without those larger horizontal lines!
I guess it is because of no weekend data.

How does the script need to be changed to not have anymore this lines?

Kind regards
Tomas


PS: Data cannot be changed! Needed to be done with the highchart.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: How to have a continous graph?

Hello Tomas!

We appreciate you reaching out to us!

The reason why these lines appeared is that your data is not continuous. You've got a point on 08.03.2021 at 4.pm and the next one is on 09.03.2021 at 9 a.m. The chart needs to connect somehow these points that's how these lines are created.

To solve this issue we can use broken-axis module, which allows us to define sections, that will be left out and all the points shifted closer to each other.

API references: https://api.highcharts.com/highcharts/xAxis.breaks

Demo: https://jsfiddle.net/BlackLabel/go5tnxmd/

Let me know if that was what you were looking for!
Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Stock”