Highcharts hover bug - with demo video

I recently posted a question about unpredictable freezes at points in Highcharts, but the question didn't get much traction. Probably because it's hard to explain.

Now I have posted the video here

http://www.youtube.com/watch?v=LovfLWpVVtc

showing this behavior.

This happens in both Chrome and Firefox (the video was made on FF using MacPro's high specification).

The video was made using this JsFiddle from the documentation.

http://jsfiddle.net/HnwbQ/1/

As you can see, when approaching the first or last point, toner is not displayed outside the diagram. However, if the cursor enters the chart and then approaches the first / last point, then a tooltip is displayed. This is unstable, and sometimes a tooltip is displayed when exiting from the outside, sometimes it is not.

Any ideas what the problem is?

ADDITIONAL INFORMATION

This happens mainly when using xAxis: {type: 'datetime'},

I am using Highcharts v2.1.9.

+4
source share
2 answers

OK. I think I found a hacking solution for you.

It seems to me that this is a mistake related to the fact that

xAxis: {type: 'datetime'}

pushes the first and last data points to the boundaries of the chart area (this does not happen when using category ).

So the way around this problem is to create some add-on using

 x-axis: { minPadding:0.02, maxPadding:0.02 } 

Then the hover behaves correctly, similar to the x category axis.

Note that minPadding and maxPadding must be> 0.02 . If you use 0.01 , you will have an error with an error.

0
source

There is no need for a “hack” - use the latest version of Highcharts http://jsfiddle.net/WdVtE/

+1
source

Source: https://habr.com/ru/post/1395997/


All Articles