c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.33k stars 1.39k forks source link

Tooltip misalignment when zooming #2706

Closed michaelsweeney closed 4 years ago

michaelsweeney commented 4 years ago

The hover tooltip works fine when the chart is entirely zoomed out but upon zoom, it doesn't properly represent mouse position. It seems like the hover event is responding to the mouse position of the chart were it not zoomed in.

Example: https://c3js.org/samples/interaction_zoom.html

digEmAll commented 4 years ago

The problem seems to happen also without the zoom, e.g. https://codepen.io/digemall/pen/wvwLWzb

If you move the mouse to the right from the first point on the left you can see that the auto-snap functionality seems broken.

It seems related to version 0.7.9, while 0.7.8 apparently is ok. Has the "auto-snap area" around the points been greatly increased ?

kt3k commented 4 years ago

@michaelrodov @digEmAll We merged a fix (#2701) about handling of tooltips. Can you check if the issue still exists with the latest version (0.7.11)?

digEmAll commented 4 years ago

@kt3k: yes, I tested my code modifying one of the c3js.org examples (that apparently are already using 0.7.11) and it seems ok

kt3k commented 4 years ago

@digEmAll Thanks for confirming 👍