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

Bug: Passing Line Chart null value(s) hides entire 'label' tooltip #2875

Closed
ghost opened this issue Jun 29, 2016 · 7 comments
Closed

Bug: Passing Line Chart null value(s) hides entire 'label' tooltip #2875

ghost opened this issue Jun 29, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented Jun 29, 2016

In 1.0, if you passed multiple data-points to a Line Chart but included a null value, a label tooltip would still display if any other numeric data-point was hovered (simply removing the null data-point from the multi-tooltip).

In 2.0, one or more null values hides the entire label tooltip, even if there are one or more numeric values and one of those data-points is hovered.

I already have a fix for this on my local project (checking the meta data for the skip flag before adding an element to the returned getElementsAtEvent() array), but wanted to make sure this wasn't intended functionality before I made a PR.

Thanks!

@etimberg
Copy link
Member

@adamtLICOR I do not think this is intended behaviour. In my mind we should either eliminate the row represented by the null data or show the row with nothing for the value.

@ghost
Copy link
Author

ghost commented Jun 29, 2016

@etimberg: Well, in my particular use-case, removing the row is desirable.

This chart has four datasets -- when all four are present, the tooltip displays as normal.
screen shot 2016-06-29 at 2 47 31 pm

If a dataset has a null value, it just doesn't show it in the tooltip (or technically 'select' it from the hover state, but that's a moot point since it's invisible)
screen shot 2016-06-29 at 2 47 41 pm

If this is sufficient, I'll make another PR when I get the chance. My fix only works for label and the newly added x-axis tooltip options. I looked into fixing dataset briefly, but wasn't able, as it's significantly different from the first two options (and it isn't required by my particular use-case).

@etimberg
Copy link
Member

I support removing the row. I think in most (>90%) of cases this is what users will expect. Please PR these changes 😄

@Regaddi
Copy link

Regaddi commented Jul 11, 2016

How's the progress on this issue?

@ghost
Copy link
Author

ghost commented Jul 11, 2016

There's a PR open for it right now, actually. Not sure what else (if anything) needs to be done

@etimberg
Copy link
Member

@adamtLICOR @Regaddi merged the PR

@pisfly
Copy link

pisfly commented Nov 11, 2016

Is this one only solves line chart? I have same issue for bar chart with v2.3.0

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

No branches or pull requests

4 participants