Skip to content

Fix donuts#309

Merged
teunbrand merged 5 commits intoposit-dev:mainfrom
teunbrand:donut
Apr 17, 2026
Merged

Fix donuts#309
teunbrand merged 5 commits intoposit-dev:mainfrom
teunbrand:donut

Conversation

@teunbrand
Copy link
Copy Markdown
Collaborator

@teunbrand teunbrand commented Apr 16, 2026

This PR aims to fix #292.

The initial problem is that VegaLite has trouble rendering device size dependent radii (dynamic size) when faceting.
The first fix in 8e02030 was not add radius encoding to layers without radius aesthetic (e.g. bar plots). However that also got rid of the inner radius that make up donuts.
The fix here instead has a hierarchy of fallbacks for the radii sizes.

The logic is now roughly this:

  • Plot has no facets --> Use dynamic size
  • Spec has width/height --> Use the size provided by spec
  • Fallback to hardcoded manual size

I went over the gallery, the polar docs and the get started examples, and all look fine now.

@teunbrand teunbrand requested a review from thomasp85 April 16, 2026 15:36
Copy link
Copy Markdown
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

@teunbrand teunbrand merged commit 966f995 into posit-dev:main Apr 17, 2026
15 checks passed
@teunbrand teunbrand deleted the donut branch April 17, 2026 08:57
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.

Donut charts are without hole

2 participants