Skip to content

Box trace with boxpoints="all" and line_width=0 doesn't render marker in legend #7159

Open
@jnumainville

Description

@jnumainville

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()

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions