Skip to content

Wrong interaction between fill:tonexty and fill:none traces #113

Closed
@iustin

Description

@iustin

Not sure if I'm misunderstanding the way fill should be used or not. In any case, a scatter graph with:

  • a few fill none lines, which might or might not intersect the fill lines, which have to come first
  • one fill tozeroy and multiple tonexty lines; none of these fill-something lines are intersecting

Everything looks OK, until one hides the tozeroy line and all tonexty lines that have values smaller than the non-fill lines. Normally I'd expect the next 'fill-something' line to expand to zero, but - since there is a hard separation between tozeroy and tonexty - this doesn't happen. Instead, the next (and smallest) fill-tonexty line will just fill to a non-fill line.

If there are no non-fill lines, then the smalles tonexty line will - as expected - fill to zeroy. It seems to me that tonexty should ignore fill:none lines, or alternatively: remove the distinction between tonexty and tozeroy, since tonexty already does tozeroy if it doesn't find a next y trace.

I'm not sure I explained correctly, so here's a chart that shows this behaviour:
https://plot.ly/~iustin/59/no-fill-fill-1-fill-2-fill-3/
just hide/unhide the fill-1 trace, and see the wrong behaviour. Additionally toggle the no-fill trace as well. If on the other hand, fill-2 is hidden, you can see that fill-3 fills correctly to fill-1, and not to no-fill, so sometimes fill:none traces are indeed ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions