Skip to content

fix(writer): boxplot produces invalid Vega-Lite spec#449

Open
cpsievert wants to merge 1 commit into
posit-dev:mainfrom
cpsievert:fix/boxplot-invalid-vegalite
Open

fix(writer): boxplot produces invalid Vega-Lite spec#449
cpsievert wants to merge 1 commit into
posit-dev:mainfrom
cpsievert:fix/boxplot-invalid-vegalite

Conversation

@cpsievert
Copy link
Copy Markdown
Collaborator

Summary

  • Skip the boxplot stat's internal "type" aesthetic when building Vega-Lite encoding channels — it's structural (consumed during data preparation), not a visual channel.
  • Strip the y2 encoding on whisker/box layers down to just {"field": ...} — secondary position channels don't accept axis, scale, type, or stack.
  • Add a schema-validated boxplot test (the existing test_geom_boxplot only checked \!json.is_empty()).

Closes #448

Test plan

  • New test_boxplot_schema_validation validates output against VL v6 JSON Schema
  • All 22 boxplot tests pass
  • Full workspace test suite passes (4 pre-existing spatial failures from network issues only)

Skip the boxplot stat's internal "type" aesthetic when building
Vega-Lite encoding channels and strip the y2 encoding on whisker/box
layers down to just the field reference. Add a schema-validated
boxplot test.

Closes posit-dev#448
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.

Boxplot produces invalid Vega-Lite: type encoding channel leaks into output

1 participant