Repository navigation
[BUG]: scattergl error bars visibility mismatch #7773
Copy link
Copy link
Closed
Labels
bugsomething brokensomething broken
Description
Activity
Thanks for the report! This sure looks like a bug. Our team probably won't be able to get to it any time soon, but we can prioritize a PR review if you want to take a look. For reference, here's the code from the reproduction Codepen that targets a div with the id "myDiv":
const payload = {
"data": [
{
"type": "scattergl",
"mode": "lines",
"name": "my",
"x": [
0,
1,
2,
3,
4
],
"y": [
1,
2,
1,
2,
1
],
"error_y": {
"type": "data",
"array": [
0.1,
0.1,
0.1,
0.1,
0.1
],
"visible": true
},
"visible": true
},
{
"type": "scattergl",
"mode": "lines",
"name": "mz",
"x": [
0,
1,
2,
3,
4
],
"y": [
2,
3,
2,
3,
2
],
"error_y": {
"type": "data",
"array": [
0.1,
0.1,
0.1,
0.1,
0.1
],
"visible": true
},
"visible": true
},
{
"type": "scattergl",
"mode": "lines",
"name": "X",
"x": [
0,
1,
2,
3,
4
],
"y": [
1.2,
2.2,
1.2,
2.2,
1.2
],
"visible": true
},
{
"type": "scattergl",
"mode": "lines",
"name": "Y",
"x": [
0,
1,
2,
3,
4
],
"y": [
2.2,
3.2,
2.2,
3.2,
2.2
],
"visible": true
}
],
"layout": {
"dragmode": "zoom",
"title": {
"text": "My title"
},
"xaxis": {
"type": "linear",
"autorange": true,
"title": {
"text": "my X"
},
"showline": true,
"tickmode": "auto",
"nticks": 30,
"tickcolor": "#000",
"zeroline": false,
"minor": {
"tickmode": "auto",
"nticks": 8,
"tickcolor": "#aaa"
}
},
"yaxis": {
"type": "linear",
"autorange": true,
"title": {
"text": "My Y"
},
"showline": true,
"exponentformat": "e",
"showexponent": "all",
"tickmode": "auto",
"nticks": 20,
"tickcolor": "#000",
"zeroline": false,
"minor": {
"tickmode": "auto",
"nticks": 4,
"tickcolor": "#aaa"
}
}
},
"config": {
"editable": false,
"scrollZoom": true,
"doubleClick": "autosize",
"displayModeBar": false,
"displaylogo": false
}
};
Plotly.newPlot('myDiv', payload.data, payload.layout, payload.config);Metadata
Metadata
Assignees
Labels
bugsomething brokensomething broken
Description
There is a synchronization bug when using
scattergltraces with error bars (error_yorerror_x) mixed with traces without error bars. When toggling the visibility of a trace via the legend, the line disappears correctly, but its error bars remain visible (ghosting), or the error bars of a different trace disappear instead.This issue does not occur when using standard
scatter(SVG) traces.Screenshots/Video
You can see the bug in action here :
Screencast.From.2026-04-24.11-55-44.mp4
Steps to reproduce
Here https://codepen.io/JulienIcon/pen/emdwbZj try to click on "my", "my" curve with disappear, but it's error bars remain visible, and the error bar of "mz" disappear.
Or :
Notes
It seems that when all traces have error_y enabled, there is no synchronization bug