oflanagan
Posts: 3
Joined: Wed Feb 15, 2023 12:34 pm

Phantom yValue when two xAxis dates the same day

Hi,

I have a chart that contains two lines (both with different series). One series (which has tooltip turned on) has two dates on the same day (June 4 2023).

However, when the user hovers over this datapoint (June 4 2023), a phantom y value appears (1,899,005), that is not present in either series. Neither of the two yValues I would expect to see from my series appear (2,174,367, 1,623,643).

I have a JSFiddle here that demos the problem: https://jsfiddle.net/rt8yks6j/5/

I would appreciate some help in understanding why this is happening and any advice on how to rectify the problem.

Many thanks in advance.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: Phantom yValue when two xAxis dates the same day

Thanks for contacting us!

This happens because line charts can only show successive points. The value that you mentioned is an average of those two others.
For non-successive points, you can use a scatter series type and set the lineWidth option to show lines between the points.

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

Feel free to ask any further questions!
Regards
Jakub

Return to “Highcharts Stock”