Skip to content

Missing buttons in modebar with Plotly 5.0.0 (documentation improvement) #3274

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

Closed
JulianWgs opened this issue Jun 23, 2021 · 6 comments
Closed
Assignees
Labels
feature something new P3 backlog

Comments

@JulianWgs
Copy link
Contributor

Hello,

Spike lines and compare data on hover is missing by default in the modebar/toolbar for Plotly 5.0.0.

Originally this was a bug report, but it turned out it is feature (as you can read here) 😄

import plotly.graph_objects as go

x = [0, 1, 2]
y = [0, 1, 4]
fig = go.Figure(go.Scatter(x=x, y=y))
fig

Plotly 4.14.3:
full toolbar

Plotly 5.0.0:
image

After an overly long search I found the solution:

fig.update_layout(modebar_add=[
    "v1hovermode",
    "toggleSpikelines",
])

So I would like to suggest to also mention toggleSpikelines in the release notes, because it took me an unnecessary long amount of time find the keyword for it. Here is also a full list of all possible mode bar buttons. A little misplaced if you ask me. In my opinion it should be placed more centrally describing the modebar. Also the documentation mentions many times examples for different mode buttons. I'd suggest to always link them to the complete list to remove duplication.

@nicolaskruchten
Copy link
Contributor

Thanks for the feedback! I've updated the changelog and release notes.

@JulianWgs
Copy link
Contributor Author

Thank you for the fast response! Feel free to close the issue (if you dont wanna tackle the documentation suggestions, just yet 😄 )

@chicolucio
Copy link

chicolucio commented Sep 16, 2021

Is this list of buttons correct? There is no v1hovermode in the list. I found out how to add this button reading this issue. There is a reference to v1hovermode here in this link about layout but maybe it would be nice to have some link to it in the configuration options page since it was removed in a recent release as @JulianWgs linked above.

@gvwilson
Copy link
Contributor

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

JulianWgs added a commit to JulianWgs/plotly.py that referenced this issue Jun 26, 2024
fixes plotly#3274

The list often serves as reference to look for modebar options and the v1hovermode was missing.
JulianWgs added a commit to JulianWgs/plotly.py that referenced this issue Jun 26, 2024
fixes plotly#3274

The list often serves as reference to look for modebar options and v1hovermode was missing.
@JulianWgs
Copy link
Contributor Author

v1hovermode was still missing from that list, but it is an easy fix, so I created a PR.

@gvwilson
Copy link
Contributor

see #4647

@gvwilson gvwilson reopened this Jun 26, 2024
@gvwilson gvwilson added P3 backlog feature something new labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 backlog
Projects
None yet
Development

No branches or pull requests

6 participants