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
{{ message }}
Repository navigation
[BUG]: TOZEROY FILL IS FILLING AREAS OF THE PLOT THAT HAS NO DATA IN IT #5632
So, I have currently implemented the tozeroy fill (the area under the curve) to a feature in one of the datasets I'm working with
When I set the fill the tozeroy, it fills under the areas of the plot that currently have no data in it, tozeroy currently joins a polygon from the bottom edge of a point that has data to the top of another edge that has data in it to cover that empty data trace section.
When I set the fill to 'none', plotly obeys the rule of not covering for the spots that has no data in it as shown in the picture below
The areas I circled is where the problem lies as shown in the picture below
Thanks for the report! This certainly seems like a bug. Our team probably won't be able to get to this in the near future, but we can prioritize a PR review if you'd like to work on it.
Thank you for the reply, I fixed it in my current workflow and I was able to make the tozeroy fill break when no data is in that region
See attached image below
Yes you can prioritize a PR for me to work on
Hi! I'm a beginner in open source and would like to work on this issue. Could you please guide me on how to reproduce it? I'll try my best to fix it! 🙏
I'd like to pick this up — the previous claimant has been inactive for ~2 months. I'll investigate whether this needs a fix in plotly.py or upstream in plotly.js and open a PR accordingly.
I traced this to the SVG scatter fill path in plotly.js, which renders plotly.py figures. The line breaks at missing values, but the to-zero fill path joins the valid segments and paints the empty span.
The proposed change closes each valid tozeroy or tozerox segment against the zero axis. It preserves a continuous fill when connectgaps: true. A draft PR will follow human review under the plotly.js contribution rules.
Follow-up on the SVG scatter fix linked above: review found three additional cases, now addressed in draft PR plotly/plotly.js#8140:
Animations that add or remove null gaps could briefly paint across gaps that exist in both frames.
Marker/arrow line.backoff could split a continuous fill into separate pieces.
Fill-hover label anchors could span disconnected regions.
The implementation now preserves each logical data segment through backoff, uses separate hover polygons, and only interpolates compatible fill paths. When segment boundaries or SVG path commands change, the fill switches to the target geometry immediately. Compatible changes, such as changing heights without changing segment structure, still animate smoothly. connectgaps: true retains a continuous fill.
Verification: 441 Jasmine tests passed across the scatter, animation, transition, and hover suites, with four tests tagged @flaky excluded. An unfiltered run reproduced the same transition-test failure as upstream. Browser checks cover both fill directions, all six line shapes, reversed/log axes, restyles, isolated points, and animation. Of 14 image renders, 13 are byte-identical to upstream; only the expected scatter_fill_corner_cases render differs. Its authoritative CI baseline update remains pending.
Human code and browser review is complete, and the changes are pushed in draft PR plotly/plotly.js#8140. CI workflows await maintainer approval; the authoritative image baseline update remains pending. The changes are not yet merged or released. The patch remains scoped to SVG scatter to-zero fills. scattergl and broader tonexty behavior are outside this change. Related upstream issue: plotly/plotly.js#2736.
Activity
camdecoster commentedon Jun 24, 2026
Thanks for the report! This certainly seems like a bug. Our team probably won't be able to get to this in the near future, but we can prioritize a PR review if you'd like to work on it.
tejiriderek87 commentedon Jun 24, 2026
Thank you for the reply, I fixed it in my current workflow and I was able to make the tozeroy fill break when no data is in that region
See attached image below
Yes you can prioritize a PR for me to work on
aminehd commentedon Jul 2, 2026
Hi, I'd like to work on this
robertclaus commentedon Jul 8, 2026
@tejiriderek87 that image looks great! If you are able to open a PR with this fix, we would be thrilled to review it!
tejiriderek87 commentedon Jul 8, 2026
I would open a PR and contact you bro
tejiriderek87 commentedon Jul 8, 2026
I'll do that in a jiffy
wenxian-1-cmyk commentedon Jul 11, 2026
Hi! I'm a beginner in open source and would like to work on this issue. Could you please guide me on how to reproduce it? I'll try my best to fix it! 🙏
LouisDeconinck commentedon Sep 12, 2026
I'd like to pick this up — the previous claimant has been inactive for ~2 months. I'll investigate whether this needs a fix in plotly.py or upstream in plotly.js and open a PR accordingly.
camdecoster commentedon Sep 12, 2026
Feel free to investigate the issue, but please present your findings and plan for a solution before creating a PR.
walkermchugh commentedon Oct 21, 2026
I traced this to the SVG scatter fill path in plotly.js, which renders plotly.py figures. The line breaks at missing values, but the to-zero fill path joins the valid segments and paints the empty span.
The related open plotly.js issue is plotly/plotly.js#2736. I posted the reproduction, proposed fix, scope, and review branch there: plotly/plotly.js#2736 (comment).
The proposed change closes each valid
tozeroyortozeroxsegment against the zero axis. It preserves a continuous fill whenconnectgaps: true. A draft PR will follow human review under the plotly.js contribution rules.walkermchugh commentedon Oct 21, 2026
Follow-up on the SVG scatter fix linked above: review found three additional cases, now addressed in draft PR plotly/plotly.js#8140:
line.backoffcould split a continuous fill into separate pieces.The implementation now preserves each logical data segment through backoff, uses separate hover polygons, and only interpolates compatible fill paths. When segment boundaries or SVG path commands change, the fill switches to the target geometry immediately. Compatible changes, such as changing heights without changing segment structure, still animate smoothly.
connectgaps: trueretains a continuous fill.Verification: 441 Jasmine tests passed across the scatter, animation, transition, and hover suites, with four tests tagged
@flakyexcluded. An unfiltered run reproduced the same transition-test failure as upstream. Browser checks cover both fill directions, all six line shapes, reversed/log axes, restyles, isolated points, and animation. Of 14 image renders, 13 are byte-identical to upstream; only the expectedscatter_fill_corner_casesrender differs. Its authoritative CI baseline update remains pending.Human code and browser review is complete, and the changes are pushed in draft PR plotly/plotly.js#8140. CI workflows await maintainer approval; the authoritative image baseline update remains pending. The changes are not yet merged or released. The patch remains scoped to SVG
scatterto-zero fills.scattergland broadertonextybehavior are outside this change. Related upstream issue: plotly/plotly.js#2736.