We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
go.Scattergl
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
go.Scatter
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!
The text was updated successfully, but these errors were encountered:
Duplicate of #2079
Sorry, something went wrong.
A few options for workarounds:
Display both Normal and Abnormal points together:
Normal
Abnormal
fig.update_layout(hovermode = "x unified")
Display none of the Normal points, but display the Abnormal points
fig.update_traces(hoverinfo="skip",selector={"name":"Normal"})
No branches or pull requests
Hi. I discover that figure with multiple matching
go.Scattergl
traces 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.Scatter
trace:So clearly this is a bug. Can someone take a look and fix this ?
Thanks for checking by!
The text was updated successfully, but these errors were encountered: