Open
Description
Hello
I noticed that something is incorrect with the legend styling, especially when we use the x unify hovermode.
Here is a short example:
import plotly.graph_objects as go
x = ["A", "B"]
fig = go.Figure(data=[
go.Bar(
x=x,
y=[1, 1],
marker=dict(color=["blue", "red"], pattern_shape=["/", ""]),
name="First Bar"
),
go.Bar(
x=x,
y=[-1, -1],
marker=dict(color=["green", "purple"], pattern_shape=["/", ""]),
name="Second Bar",
),
])
fig.update_layout(hovermode="x unified")
fig.show()
As we can see, the second bar uses the "general" legend style, which leads to an incorrect style for the items on the right.
plotly version = 5.24.1
And thank you for your amazing work!