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

Tooltips & x-axis mode v2.2.0 #3061

Closed
madmoizo opened this issue Jul 29, 2016 · 7 comments
Closed

Tooltips & x-axis mode v2.2.0 #3061

madmoizo opened this issue Jul 29, 2016 · 7 comments
Assignees
Milestone

Comments

@madmoizo
Copy link

madmoizo commented Jul 29, 2016

Hi,

1 - Tooltips arrow default position is "right" and we can see the arrow blink from the right to its calculated position during fade in and fade out animation.
arrow

2 - For bar chart, x-axis mode (thanks for this option @Mesonyx) depends of "stacked" param
if stacked is true, mode = label
stacked
if stacked is false, mode = single
no_stacked
So i'm wondering if "x-axis" shouldn't be an option instead of a "mode". It will give the liberty to have x-axis + single or x-axis + label.

3 - For line chart, when pointRadius = 0 (for a clean design or when there is a lot of data points) tooltip is visible only if your cursor is on the 1px corresponding to the X.
tooltips_line
It is possible to have something like padding left/right = space between two points / 2 for the "hover zone" of the tooltip.
padding_line

@etimberg
Copy link
Member

The animation is definitely a bug. I thought it was already reported, but I couldn't find a duplicate issue.

That's an interesting idea for the x axis hover. Thoughts @simonbrunel @zachpanz88 @Mesonyx ?

For #3, the points have a hitRadius option that is a number that is added to the radius to determine the hit region. The default is 1. This could be changed, but it isn't what you really want. One thing I have envisioned is to have a 'nearest' hover / tooltip mode. This would always pick the nearest point and then use that. Would that be more like what you are looking for?

@madmoizo
Copy link
Author

madmoizo commented Aug 1, 2016

Nearest mode should be perfect :)

@olisch
Copy link

olisch commented Aug 18, 2016

nearest mode is exactly the 50% rule between two data points ( at least for tooltips.mode: 'x-axis'). would be great to have such an option!

@etimberg
Copy link
Member

etimberg commented Oct 5, 2016

@frlinw the concept of the x-axis mode was I think implemented in #3400. We now have an intersect mode that configures tooltip modes to run either all the time or only when the cursor intersects an item in the chart. Will try and figure out why the flip happens though .. it could be that something is calculated during draw instead of during the update

@madmoizo
Copy link
Author

madmoizo commented Oct 5, 2016

Great work, waiting for 2.4 so :) I will test it asap

@etimberg Just a question, you can't have 'label' mode (now 'index') + nearest feature?

@etimberg
Copy link
Member

etimberg commented Oct 8, 2016

@frlinw you can do index mode and intersect: false which will find the nearest item, then display the tooltip for all things at the same index.

@etimberg etimberg mentioned this issue Oct 8, 2016
@etimberg
Copy link
Member

etimberg commented Oct 9, 2016

Fixed last remaining issue, the weird arrow during hover, in #3446

@etimberg etimberg closed this as completed Oct 9, 2016
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

3 participants