Skip to content

Add hoverinfo skip #851

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

Merged
merged 3 commits into from
Aug 17, 2016
Merged

Add hoverinfo skip #851

merged 3 commits into from
Aug 17, 2016

Conversation

john-soklaski
Copy link
Contributor

Add a new hoverinfo flag 'skip'. This prevents a trace from being considered for hovering or clicking. Addresses #678.

@john-soklaski
Copy link
Contributor Author

@etpinard I'm working on testing gl2d and gl3d plots

@john-soklaski
Copy link
Contributor Author

@etpinard I was able to add some support for gl2d and gl3d.

There are a few limitations that I'm aware of: because gl2d and gl3d use the gl-plot2d and gl-plot3d packages for picking, traces with hoverinfo: 'skip' still affect the picking logic. I was able to prevent the spikes from being shown for the gl2d plot, but gl-plot3d handles the spikes drawing internally.

@etpinard
Copy link
Contributor

I was able to prevent the spikes from being shown for the gl2d plot, but gl-plot3d handles the spikes drawing internally.

Spikes in gl3d plots are controlled via the layout.scene.?axis.showspikes options. They are effectively decoupled from the hover logic. See how the first modebar button from the right toggles showspikes here. In brief, you don't have to worry about the 3D spikes.

Regarding gl3d and gl2d, I was most concerned about making sure that 'skip' does as good as 'none' at this stage. I don't mind if 'skip' only works for plots that pass through Fx.hover.

Great. So looks like you got everything right. Thanks for adding those tests!

The only thing missing is adding information about 'skip' vs 'none' in the hoverinfo attribute declaration description field.

I'll take this PR for a final spin on Monday, before merging. Thanks again for you efforts.

@john-soklaski
Copy link
Contributor Author

@etpinard Thanks for taking a look, I've added some information to the description about the behavior of skip and none.

description: [
'Determines which trace information appear on hover.',
'If `none` or `skip` are set, no information is displayed upon hovering.',
'But, if `none` is set, click and hover events are still fired.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Thanks!

@etpinard etpinard added this to the v1.17.0 milestone Aug 17, 2016
@etpinard
Copy link
Contributor

Great PR. @john-soklaski thanks very much for your efforts 🎉

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

Successfully merging this pull request may close these issues.

2 participants