Commit 44eb17d
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments