Skip to content
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

Fill doesnt work when curves are of type scattegl #7383

Open
53r1k opened this issue Feb 28, 2025 · 2 comments
Open

Fill doesnt work when curves are of type scattegl #7383

53r1k opened this issue Feb 28, 2025 · 2 comments
Labels
bug something broken P3 backlog

Comments

@53r1k
Copy link

53r1k commented Feb 28, 2025

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!

@53r1k
Copy link
Author

53r1k commented Feb 28, 2025

Found a workaround by enclosing the space between the two curves I want to fill in a polygon:

const xPolygon = xValues.concat(xValues.reverse());
const yPolygon = yMax.concat(yMin.reverse());

then for the plotly data, providing this polygon data and filling toself:
x: xPolygon,
y: yPolygon,
type: "scattergl",
mode: "lines",
fill: "toself",
fillcolor: "rgba(0, 0, 0, 0.14)",

@gvwilson gvwilson added bug something broken P3 backlog labels Feb 28, 2025
@gvwilson
Copy link
Contributor

Thanks @53r1k - glad you found a workaround. Realistically, I don't think we're going to be able to get to this one any time soon, but we'd be happy to prioritize review if you are interested in preparing a PR. Thanks - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants