Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken tooltips with scatter line chart #2757

Closed
kolinger opened this issue Jun 12, 2016 · 2 comments
Closed

Broken tooltips with scatter line chart #2757

kolinger opened this issue Jun 12, 2016 · 2 comments

Comments

@kolinger
Copy link

I have scatter line chart with two datasets and tooltips set to "label" mode. First dataset have 2 values and second 3 values.

In this configuration some values have broken tooltips - tooltip will not show and chart will fail in console with message "Chart.bundle.js:11561 Uncaught TypeError: Cannot read property '_index' of undefined".

This is because first dataset is missing first value.

Can be reproduced by this code - http://codepen.io/kolinger/pen/YWqyxg?editors=0010
Try hover on
x=Jan 12, 10AM
y=15

Tested with lastest version (2.1.4).

@defme
Copy link

defme commented Aug 29, 2016

it seems to be fixed #2922?

not really hovering by data x value as was asked in #3179, and fixed using the _model x value, but works good for me.

upd: sorry, works as expected only for 'x-axis' mode (#3179), not label (this #issue).

@etimberg
Copy link
Member

This was fixed in #3400 with the new 'x' tooltip mode. It retrieves all items that hit test at the mouse position.

The 'label' mode was more appropriately named 'index' starting in #3400 to better reflect how it works. (The old mode still works so not charts will break).

The best way to fix this issue would be to use the new 'x' mode. See the gif below to get an idea of how the new mode works

x mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants