Loading...
Loading...
Use this skill whenever you are about to create ANY chart, graph, plot, dashboard, or data visualization, in ANY output medium (HTML/React artifact, inline SVG, matplotlib/plotly/d3/Recharts, PNG). Read it BEFORE writing the first line of chart code, choosing chart colors, building a stat tile / KPI row, or laying out a dashboard. Teaches a design-system-agnostic method - form heuristic, color formula with a runnable validator, mark specs, interaction rules. Default palette in references/palette.md.
npx skill4agent add jimliu/baoyu-design datavizreferences/palette.mdThe single most important habit: the color part is computable, so compute it. Never eyeball whether a palette is colorblind-safe - run.scripts/validate_palette.js
references/choosing-a-form.mdreferences/color-formula.mdnode scripts/validate_palette.js "<hex,hex,...>" --mode light<script type="module">data-palette<body>console.table--mode darkreferences/marks-and-anatomy.mdreferences/interaction.mdreferences/anti-patterns.md--pairs allreferences/palette.md| Parameter | What the system provides |
|---|---|
| Ramps | the hue scales (named steps) the palette draws from |
| Categorical theme | the fixed hue order (a named theme); default + alternates |
| Sequential hue | the default single hue for magnitude |
| Diverging pair | two warm/cool poles + a neutral midpoint |
| Status palette | good / warning / serious / critical - steps distinct from categorical |
| Texture fill | one directional hand-drawn fill, used at 45° / 135° |
| Surfaces | light & dark chart-surface colors (the validator needs these) |
| Filter controls | date-range & dimension controls (behavioral spec in |
| File | What it answers |
|---|---|
| Which chart type / is it even a chart? |
| The four jobs, the six checks, snap-to-passing |
| Mark specs, spacers, labels, figures, hero number |
| Tooltips & hover, filters & time ranges |
| The pieces a chart is made of - build each in plain HTML |
| What goes wrong - check every chart against this |
| The reference palette instance - every parameter, filled in; swap for your brand's |
| Runnable six-checks validator (run it; don't eyeball) |