Skip to content

Fix ribbon fills when a bound is missing - #2507

Open
kshptl wants to merge 1 commit into
plotly:masterfrom
kshptl:fix/pr-engine-1060-3a4ba86ab050
Open

kshptl wants to merge 1 commit into
plotly:masterfrom
kshptl:fix/pr-engine-1060-3a4ba86ab050

Conversation

@kshptl

@kshptl kshptl commented Dec 2, 2026

Copy link
Copy Markdown

ggplotly() can shade the wrong area when geom_ribbon() has an NA in ymin or ymax. add_ribbons() has the same issue.

This splits each series at missing bounds and makes a separate polygon for each run of complete points. An animation frame with no complete points gets a blank trace so it clears the previous ribbon. add_ribbons(connectgaps = TRUE) still connects gaps along each edge.

Fixes #1060.

  • The new plotly_build() tests check polygon coordinates, empty animation frames, native trace order and connectgaps = TRUE. Four coordinate assertions failed on the base with the new tests. The focused review run on the patch passed 359 assertions with zero failures, four warnings and two empty-test skips.
  • The full offline suite with quantreg passed 1,486 assertions on the base and 1,490 on the patch. Both runs had two boxplot failures and three CDN download errors.
  • R CMD build and the local R CMD check --no-tests --no-manual --no-multiarch exited 0 on both versions. The local checks reported the same Rd warning and two notes. The --as-cran checks stopped at the CRAN metadata request.

The offline suite used a fixed R release value and a local icicle fixture. It skipped visual and Shiny tests. Browser rendering, remote CRAN checks and the full CI platform matrix still need verification.

Signed-off-by: Kush Patel <56747429+kshptl@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ggplotly not rendering geom_ribbon() correctly with NA values

1 participant