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, inli
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-dataviz-428939ed951a ,按照其中的说明把「Data Visualization」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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.
Color comes LAST. Most bad charts pick colors first.
references/choosing-a-form.mdreferences/color-formula.mdnode scripts/validate_palette.js "<hex,hex,...>" --mode light (relative to
this skill's base directory - or load it as <script type="module"> in the
chart's own page, where it reads
data-palette off <body> and logs a console.table report). It returns
pass/fail on the lightness band, chroma floor, adjacent-pair CVD separation,
the normal-vision floor, and contrast. Fix anything that FAILs before continuing. Re-run for
--mode dark with that mode's surface.references/marks-and-anatomy.mdreferences/interaction.mdThen check the result against references/anti-patterns.md - it is the catalog
of what goes wrong. If your chart matches an entry, it's wrong.
--pairs all cut series or facet instead - see check 4. A contrast WARN
obligates visible labels or a table view - it is not dismissable.The method is invariant; only these parameters change per system. The reference
instance - every value filled in - is references/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 interaction.md) |
To onboard a new system: fill those rows, feed its ramps to the validator, and let it snap each slot to the nearest passing step. Structure and rules stay as written.
| File | What it answers |
|---|---|
references/choosing-a-form.md | Which chart type / is it even a chart? |
references/color-formula.md | The four jobs, the six checks, snap-to-passing |
references/marks-and-anatomy.md | Mark specs, spacers, labels, figures, hero number |
references/interaction.md | Tooltips & hover, filters & time ranges |
references/components.md | The pieces a chart is made of - build each in plain HTML |
references/anti-patterns.md | What goes wrong - check every chart against this |
references/palette.md | The reference palette instance - every parameter, filled in; swap for your brand's |
scripts/validate_palette.js | Runnable six-checks validator (run it; don't eyeball) |