-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fill doesnt work when curves are of type scattergl #7383
New issue
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
Comments
Found a workaround by enclosing the space between the two curves I want to fill in a polygon: const xPolygon = xValues.concat(xValues.reverse()); then for the plotly data, providing this polygon data and filling toself: |
I'm currently looking into the issue, and I managed to identify the problem. Thankfully it isn't webgl itself, just the logic about linking curves to each other isn't quite correct in the scattergl implementation. I was able to fix the issue I was experiencing by adjusting how the curves are linked, but it's a bit too hacky to PR right now. Any way, In the process of doing that, I also realized that the scattergl implementation of the fill also doesn't quite work with "toself", when the resulting shape is twisted (lines intersect), this can be tested with this PlotData for example: { Since regular scatter has a fundamentally different implementation, it works there without a problem. So if you change the type to "scatter", it works fine. Im not exactly sure, are interesecting lines supposed to be supported with fills like tonexty or toself? |
When the type of 2 curves is "scattergl" and there is a fill betweem them, it doesnt work.
Here is a reproducible, minimized codepen: https://codepen.io/GoldBlacky/pen/yyLgOdd
I would also be very happy about a workaround or general direction to try to implement a workaround myself. The reason I need scattergl is because my application is too laggy when using scatter with multiple thousand data points.
Thanks!
The text was updated successfully, but these errors were encountered: