You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backstory
I’m building an application where I use plotly.js to visualize a lot of data points, up to 10k. So, for performance reasons I’m using scattergl type plots. The application has a feature that performs linear fitting on data selected by the user, using the box-select or lasso-select tools. The resulting trend line is then plotted on top of the data.
The problem
When a user selects, and then de-selects points (by double-click) after the trend has been plotted, the Z-order of the traces is somehow changed. This causes the trend line to appear behind the data resulting in poor visibility. The problem does not occur when using type: ‘scatter’ instead of ‘scattergl’.
Backstory
I’m building an application where I use plotly.js to visualize a lot of data points, up to 10k. So, for performance reasons I’m using scattergl type plots. The application has a feature that performs linear fitting on data selected by the user, using the box-select or lasso-select tools. The resulting trend line is then plotted on top of the data.
The problem
When a user selects, and then de-selects points (by double-click) after the trend has been plotted, the Z-order of the traces is somehow changed. This causes the trend line to appear behind the data resulting in poor visibility. The problem does not occur when using type: ‘scatter’ instead of ‘scattergl’.
How to reproduce
The behaviour can be reproduced with the steps below and the following codepen:
https://codepen.io/Convo/pen/GLZYdw 2
As you can see the Z-order has been swapped after using the selection tool. This is undesired behavirou.
Related forum post:
https://community.plot.ly/t/selection-changes-z-order-when-using-scattergl/21924
The text was updated successfully, but these errors were encountered: