refactor(component): Citrine chart palette + opinionated ECharts defaults - #1015
Conversation
…ults (#821 #822) The Citrine 10-color categorical palette replaces Deep Ocean as the default, anchored on the brand amber (38 95% 55%) as color 1. The palette was optimized programmatically: minimum pairwise deltaE under protanopia/deuteranopia/tritanopia simulation dominates Deep Ocean on every axis (first-5 worst case 28-32 vs 8-11; all-10 16-18 vs 4-6), locked in by a permanent CVD-safety contract test. Saved dashboards using 'deep-ocean' alias to citrine transparently. ECharts themes gain deliberate out-of-the-box styling (#822): - compact axis numbers (8K / 45.2K / 1.2M) via formatAxisCompact - bars: no floating value labels, 3px top radius - lines: 1.5px stroke, round caps, smooth + subtle gradient/low-alpha area fill by default (all opt-outable props) - pies: hairline slice gaps - tooltips: popover-token styling (graphite bg, token border, 8px radius, --shadow-lg) instead of the ECharts white box - axis/legend/grid colors re-derived from the Graphite & Citrine tokens design-system.spec updated to the Citrine contract (was asserting Deep Ocean hue 217 as chart-1). DEEP_OCEAN_* array names stay as deprecated aliases for external plugin compat. Before/after chart screenshots (light+dark) in screenshots/v1.1-redesign/. Closes #821 Closes #822 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (14)
WalkthroughThis PR replaces the default "Deep Ocean" chart palette with a new "Citrine" categorical palette anchored on the Graphite & Citrine accent, adds colorblind-safety validation, introduces a compact axis-label formatter, consolidates theme defaults (tooltip/bar/line/pie styling), and refines LineChart rendering defaults (smooth curves, filled area, reduced line width). ChangesCitrine Palette & Theme Defaults Refactor
Sequence Diagram(s)Skipped: Changes are not primarily a new feature or multi-component flow; they are palette/defaults refactoring with straightforward wiring and validation. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



What
Closes #821 and #822 — completes the v1.1.0-alpha milestone (with #1014).
Citrine palette (#821)
10-color categorical default anchored on the brand citrine amber as color 1. Not hand-waved colorblind-safe: the palette was optimized programmatically (greedy search maximizing min pairwise deltaE under Viénot protanopia/deuteranopia/tritanopia simulation) and dominates Deep Ocean on every CVD axis — first-5 worst case deltaE 28–32 vs Deep Ocean's 8–11; all-10 16–18 vs 4–6. A permanent contract test (
citrine-cvd-safety.test.ts) locks those thresholds for both light and dark variants. Saved dashboards referencingdeep-oceanalias to citrine;DEEP_OCEAN_*exports remain as deprecated aliases for external plugins.Opinionated chart defaults (#822)
Compact axis numbers (
45.2K/1.2M), quiet grid, bars without floating labels + subtle top radius, fine smooth lines with gentle area fill (1.5px, round caps — all opt-outable), pie slice gaps, and tooltips styled from the Graphite & Citrine tokens instead of the ECharts white box. Theme-level where possible, prop defaults where themes can't reach (line chart).Screenshots
screenshots/v1.1-redesign/— comparebefore-03-charts-light.png(default blue bars, raw1,000,000axis, floating values) withafter-03-charts-light.png(citrine bars,1M/800Kaxis, rounded tops) and the dark pair.Verification
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Style