Skip to content

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

Closed
@JulianWgs

Description

@JulianWgs

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.

Metadata

Metadata

Assignees

Labels

P3backlogfeaturesomething new

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions