plotly / plotly/plotly.py

"Double click to isolate one trace" does not always do so

Open
#3,548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Double clicking on one element in the legend does not always isolate the element's corresponding trace. Sometimes all traces are shown, and sometimes no change is made. See the recording below. A double click preceded every flicker.

import plotly.graph_objects as go


fig = go.Figure()

trace1 = go.Scattermapbox(lat=[0], lon=[0])
fig.add_trace(trace1)

trace2 = go.Scattermapbox(lat=[1], lon=[1])
fig.add_trace(trace2)

lat_cen = 0
lon_cen = 0

fig.layout.mapbox.center = {"lat": lat_cen, "lon": lon_cen}
fig.layout.mapbox.style = "open-street-map"
fig.layout.mapbox.zoom = 5

fig.show()

https://user-images.githubusercontent.com/9297904/149550631-a6829707-afcd-43d8-83a3-80ed0ee9b34a.mov

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided Python example and reproducing the inconsistent legend double-click behavior. Trace the legend interaction entry point used by the Scattermapbox figure; done means double-clicking one legend element consistently isolates its corresponding trace without flickering or leaving all traces visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
plotly, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.