[BUG]: TOZEROY FILL IS FILLING AREAS OF THE PLOT THAT HAS NO DATA IN IT · Issue #5632 · plotly/plotly.py · GitHub
Skip to content

[BUG]: TOZEROY FILL IS FILLING AREAS OF THE PLOT THAT HAS NO DATA IN IT #5632

Open

Description

@tejiriderek87

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

Thank you

Image

Activity

  1. camdecoster commented on Jun 24, 2026

    @camdecoster
    Contributor

    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.

  2. tejiriderek87 commented on Jun 24, 2026

    @tejiriderek87
    Author

    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

    Image
  3. aminehd commented on Jul 2, 2026

    @aminehd

    Hi, I'd like to work on this

  4. robertclaus commented on Jul 8, 2026

    @robertclaus

    @tejiriderek87 that image looks great! If you are able to open a PR with this fix, we would be thrilled to review it!

  5. tejiriderek87 commented on Jul 8, 2026

    @tejiriderek87
    Author

    Hi, I'd like to work on this

    I would open a PR and contact you bro

  6. tejiriderek87 commented on Jul 8, 2026

    @tejiriderek87
    Author

    @tejiriderek87 that image looks great! If you are able to open a PR with this fix, we would be thrilled to review it!

    I'll do that in a jiffy

  7. wenxian-1-cmyk commented on Jul 11, 2026

    @wenxian-1-cmyk

    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! 🙏

  8. LouisDeconinck commented on Sep 12, 2026

    @LouisDeconinck

    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.

  9. camdecoster commented on Sep 12, 2026

    @camdecoster
    Contributor

    Feel free to investigate the issue, but please present your findings and plan for a solution before creating a PR.

  10. walkermchugh commented on Oct 21, 2026

    @walkermchugh

    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 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.

  11. walkermchugh commented on Oct 21, 2026

    @walkermchugh

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething brokengood first issuesuitable for newcomersgood for agentGood issue for an agent to solvesize: 3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions