Skip to content

Polish area and ribbon layers#97

Merged
teunbrand merged 12 commits intoposit-dev:mainfrom
teunbrand:ribbon_area
Feb 5, 2026
Merged

Polish area and ribbon layers#97
teunbrand merged 12 commits intoposit-dev:mainfrom
teunbrand:ribbon_area

Conversation

@teunbrand
Copy link
Collaborator

  • Ribbon is now functional
  • Area now has a stacking parameter that can be on/off(default)/fill
  • Adds docs for both
  • Enables the linewidth aesthetic for both
  • Tests by claude

- Add render_ribbon tests for ymin/ymax to y/y2 translation
- Add render_area tests for all stacking parameter values (on/off/fill/default)
- Add render_area test for invalid stacking values
- Fix render_ribbon bug: ymin should map to y2 not y
- Update test_variant_aesthetics to use errorbar instead of ribbon
Comment on lines +1175 to +1176
GeomType::Ribbon => render_ribbon(&mut encoding),
GeomType::Area => render_area(&mut encoding, layer)?,
Copy link
Collaborator Author

@teunbrand teunbrand Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly mad that I cannot seem to fit GeomType::Boxplot => render_boxplot(...) into the same match statement because it produces multiple layers.

@teunbrand teunbrand requested a review from thomasp85 February 4, 2026 14:58
Copy link
Collaborator

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some comments

Comment on lines +34 to +39
fn default_params(&self) -> &'static [DefaultParam] {
&[DefaultParam {
name: "stacking",
default: DefaultParamValue::String("off"),
}]
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should find a unified position adjustment approach, but let's keep it for now

@teunbrand teunbrand merged commit 6c76b8b into posit-dev:main Feb 5, 2026
3 checks passed
@teunbrand teunbrand deleted the ribbon_area branch February 5, 2026 08:19
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.

2 participants