Box trace with `boxpoints="all"` and `line_width=0` doesn't render marker in legend
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
When the width of a box trace is set to 0 and boxpoints is set to "all", it seems that the legend still attempts to render the box in the legend, which will never appear because the width is 0. It seems that in this case the marker should appear in the legend instead, as is already the case when the line alpha is 0.
I'd be happy to work on this as well.
import plotly.express as px
df = px.data.tips()
fig = px.strip(df, x="total_bill", y="day", color="time")
new_fig = fig.update_traces(line={"color": None, "width": 0})
new_fig.show()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided box-trace example with width 0 and boxpoints set to "all", then trace the box legend rendering path. Compare it with the existing behavior when line alpha is 0; done means the marker appears in the legend when the box itself cannot render.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100