Hi. I discover that figure with multiple matching go.Scattergl traces have wrong hover order. Consider this example:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scattergl(
x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], y=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
line_color='rgb(0,100,80)',
name='Normal',
))
fig.add_trace(go.Scattergl(
x=[5, 6], y=[5, 6],
mode='markers',
marker_color='rgb(255,0,0)',
name='Abnormal',
))
fig.show()
I get this plot:

When I hover on the [5,5] points, the hover text should be in Red and say "Abnormal", but its not.
If I flip the trace order like this:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scattergl(
x=[5, 6], y=[5, 6],
mode='markers',
marker_color='rgb(255,0,0)',
name='Abnormal',
))
fig.add_trace(go.Scattergl(
x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], y=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
line_color='rgb(0,100,80)',
name='Normal',
))
fig.show()
I get this plot:

Which have the correct hover text, but all the red markers are behind the green markers.
This does not happen for normal go.Scatter trace:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], y=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
line_color='rgb(0,100,80)',
name='Normal',
))
fig.add_trace(go.Scatter(
x=[5, 6], y=[5, 6],
mode='markers',
marker_color='rgb(255,0,0)',
name='Abnormal',
))
fig.show()

So clearly this is a bug. Can someone take a look and fix this ?
Thanks for checking by!
Hi. I discover that figure with multiple matching
go.Scattergltraces have wrong hover order. Consider this example:I get this plot:

When I hover on the [5,5] points, the hover text should be in Red and say "Abnormal", but its not.
If I flip the trace order like this:
I get this plot:

Which have the correct hover text, but all the red markers are behind the green markers.
This does not happen for normal
go.Scattertrace:So clearly this is a bug. Can someone take a look and fix this ?
Thanks for checking by!