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

Make chart mouse hover feel responsive #514

Merged
merged 1 commit into from
May 5, 2016

Conversation

ubershmekel
Copy link
Contributor

@ubershmekel ubershmekel commented May 5, 2016

100 ms causes a 10 fps performance which feels like it's lagging behind your cursor. 30 ms feels too fast and noisy, 50 ms feels snappy yet stable.

#503

100 ms causes a 10 fps performance which feels like it's lagging behind your cursor. 30 ms feels to fast and noisy, 50 ms feels snappy yet stable.
@etpinard
Copy link
Contributor

etpinard commented May 5, 2016

Thanks for the PR 🍻

We'll need some sort of consensus before merging it though.

@alexcjohnson @mdtusz @monfera thoughts?

@monfera
Copy link
Contributor

monfera commented May 5, 2016

This looks like good, reasonable fine/tuning, I'm fine with this PR. I do NOT suggest the below, much more heavyweight options for now because any of them is best done as part of a major polish/usability improvement effort.

In the future, we might think of:

  • debounce: not showing details when the mouse is in motion
  • fade in / fade out: nice thing about it is that a fading trail gives a sense of the data volatility but it's not good for numbers/text that would overlap
  • easing: for example, a tooltip box doesn't have to jump to the next point, it may be animated (for which the usual transition time is 50-200ms) - most often, the noise comes not from quickly changing numbers, but changing location as a non-smooth or discontinuous function over time
  • motion blur (had to include this one): for example, http://nbremer.github.io/openvis2016/slides/#/fuzzy-code

I think that easing is the easiest of these esp. with D3 but again, this PR is fine as it is.

@mdtusz
Copy link
Contributor

mdtusz commented May 5, 2016

BIG fan of this PR. @monfera - you're right that in the future we should a "softer" visual transition, but this definitely improves the feel of plots.

🍻 @ubershmekel! 💃 from me.

@alexcjohnson
Copy link
Collaborator

@ubershmekel 💃 - nice optimization.

@monfera I'm all for enhancements that make it easier to understand the data, or improve aesthetics without compromising understanding. I like the idea of debounce; fade out, when we're not going to show another tooltip; fade in maybe if it's very quick. But I have to say that tooltips easing from one data point to another have always grated on me when I've seen that done in other libraries. Animation has its place in object constancy but elsewhere I feel it impedes understanding the data.

@etpinard
Copy link
Contributor

etpinard commented May 5, 2016

@ubershmekel Nicely done. You win the PR of the week 🏆

@etpinard etpinard merged commit 7191173 into plotly:master May 5, 2016
@monfera
Copy link
Contributor

monfera commented May 9, 2016

Linking a relating article: http://valhead.com/2016/05/05/how-fast-should-your-ui-animations-be/

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

Successfully merging this pull request may close these issues.

None yet

5 participants