--- name: Data Visualization description: > Use this skill whenever you are about to create ANY chart, graph, plot, dashboard, or data visualization, in ANY output medium — an HTML or React artifact, inline SVG, plotting code in any library (matplotlib, plotly, d3, Recharts, …), an image/PNG you will render and upload, or a chart shared into Slack. Read it BEFORE writing the first line of chart code, choosing chart colors, building a stat tile / meter / KPI row, or laying out a dashboard. When the destination is a first-party document connector (host-designated, never self-described) that renders live charts, hand it the rows (inline, or as an uploaded data file the chart cites) rather than a rendered PNG/SVG — a picture of a chart loses hover, data inspection and per-value comments. Produces visualizations that read as one system — elegant, accessible, consistent in light and dark — using a brand-neutral placeholder palette you swap for your own. Teaches a design-system-agnostic method: a form heuristic, a color formula with a runnable validator, mark specs, and interaction rules. A validated default palette is documented in `references/palette.md` — swap that file's values for your brand's. Triggers on: "chart", "graph", "plot", "data viz", "visualization", "dashboard", "analytics", "visualize data", "categorical colors", "sequential / diverging palette", "stat tile", "sparkline", "heatmap", "legend", "axis", "tooltip", "chart colors", "color by series". --- # Data Visualization A chart is **read by people and executed by you**. This skill turns "make it look good" into a procedure with checks, so the result is right by construction rather than by taste. **The method here is design-system-agnostic.** Nothing in the procedure, the form heuristic, the six checks, or the mark specs is specific to one product. A design system supplies a small set of *parameters* (its ramps, a categorical order, a diverging pair, a status palette, a texture, its surfaces, its filter components); the method consumes them unchanged. A **validated default palette** is the reference instance, fully specified in `references/palette.md`. To target your brand, read that file's structure and substitute its values - touch nothing else. > The 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`. ## The procedure - do these in order Color comes LAST. Most bad charts pick colors first. 1. **Pick the form.** What is the data's job - magnitude, identity, polarity, a single headline, change-over-time? The job picks the chart type, and sometimes the answer is *not a chart* (a stat tile or hero number). -> `references/choosing-a-form.md` 2. **Assign color by the job it does.** Categorical (identity), sequential (magnitude), diverging (polarity), or status (state) - each has one rule. Assign categorical hues in fixed order, never cycled. -> `references/color-formula.md` 3. **VALIDATE the palette - run the script, don't reason about Delta E.** `node scripts/validate_palette.js "" --mode light` (relative to this skill's base directory - or load it as `