Skip to content

Commit 44eb17d

Browse files
teunbrandclaude
andauthored
Fix data-panel misassignment (#424)
* Fix facet sort-array bug by encoding panel order as integers Vega-Lite has a bug where explicit sort arrays on facet field definitions cause data-panel misalignment. Work around this by converting discrete facet column values to integer sort indices in the unified dataset and reconstructing display labels via header.labelExpr. - Split apply_facet_ordering into resolve_facet_ordering (pure: scale → index map) and apply_facet_ordering (rewrites data column to integers) - Add build_indexed_facet_label_expr to map integers back to labels, composing with user RENAMING when present - Extract apply_binned_facet_reverse for the binned sort: "descending" case (unaffected by the bug since it uses a string, not an array) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Deduplicate apply_faceting with apply_facet_aesthetic helper Extract the per-field facet pipeline (build def, resolve ordering, rewrite data, label renaming, binned reverse) into apply_facet_aesthetic. Hoist the shared "move layer/width/height into inner spec" block after the match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * add news bullet --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5912bb7 commit 44eb17d

2 files changed

Lines changed: 333 additions & 135 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
separated from directly feeding into the visualisation data (#415)
77
- Fixed bug where panel axes were unintentionally anchored to zero when using
88
`FACET ... SETTING free => 'x'/'y'` (#410).
9+
- Fixed bug where faceted data were matched to the incorrect panels (#409)
910

1011
## 0.3.1 - 2026-04-30
1112

0 commit comments

Comments
 (0)