# Flint Chart

> Use when the user wants to visualize data — from 'which chart should I use?' to 'render this'. Helps pick the right chart from the analytical question (comparison / trend / distribution / relationship / proportion / flow / KPI), then authors a ChartAssemblyInput and renders via the flint-chart-mcp server (Vega-Lite / ECharts / Chart.js). Transform data before Flint; style tweaks after Flint.

- Skill: `fabioc-aloha/flint-chart` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add fabioc-aloha/flint-chart`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fabioc-aloha/flint-chart/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: fabioc-aloha (https://skillmd.com/u/fabioc-aloha)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/fabioc-aloha/flint-chart

---


# flint-chart: pick, author, and render a chart

## Load the version-matched Flint language first

Read `flint://agent-skill` or invoke `author_flint_chart` before authoring. That
source-owned resource carries the exact semantic types, chart templates,
properties, and backend boundaries for the installed MCP version. This skill
adds Alex-owned framing, creative treatment selection, configured-runtime
setup, and `render-verify`; it does not replace Flint's language reference.

For the conceptual grammar, compiler model, data-access boundary, backend
contract, rendered-demo evidence, and tagged Microsoft links, read
[`references/flint-language-reference.md`](references/flint-language-reference.md).
It describes the published `0.5.1` contract that Illustrator pins. Use the MCP
resource, `list_chart_types`, and `list_themes` as the final authority for the
runtime actually installed in the host.

## What you produce (and what you do NOT)

Your output is the **spec**: the `chart_spec` and `semantic_types` of a
`ChartAssemblyInput`. You reference data columns **by name**. The host
passes the resulting input to `assembleVegaLite`, `assembleECharts`,
or `assembleChartjs` to get a backend spec.

**You write the input spec, not the output spec.** And critically:

- **DO** emit `chart_spec` (chart type, channel→field mapping, properties)
  and `semantic_types` (field → semantic type).
- **Carry the claim into a standalone chart.** Set `chart_spec.title` to the
  Chart Brief's Big Idea, tightened only for display, and use `subtitle` for
  what is measured, of whom, when, and in which units. A chart may travel
  without its surrounding prose; its claim must travel with it.
- **Reference columns by name.** How `data` itself gets bound depends on
  the situation — a URL, a host-side variable, or embedded rows (see "How
  data gets bound"). Embedding is fine for small tables; just don't
  re-serialize a _large_ dataset by hand, since that risks truncation and
  silent value corruption and wastes tokens.
- **Transform data before Flint.** If the requested chart needs aggregation,
  filtering, joins, pivots, derived columns, or long/wide reshaping beyond
  Flint's built-in static-series fold, use a coding, notebook, SQL, or data tool
  first. Then author the Flint spec against the transformed table.
- **Style after Flint, only when needed.** Author structure in Flint. For a
  presentation tweak Flint does not express (a reference line, annotation, or
  shaded band), use the Vega-Lite escape hatch — see "Post-Flint style
  customization". Never feed edited Vega-Lite JSON back to `render_chart`.
- **Look at what you rendered.** A chart with a collapsed scale, a merged color
  scale, or an empty data binding renders as a valid image that tells the wrong
  story — `validate_chart` cannot catch that. Load the `render-verify` skill
  after rendering, and always after a post-Flint Vega-Lite edit.

## Verify Flint is available before rendering

Before you promise to render a chart, confirm the tools exist. If they don't,
install them (or ask the user to). Failing loudly early is cheaper than
authoring a spec no one can render.

### For MCP rendering (default in this skill)

1. **Check for the `flint` MCP server.** Look in your available tool inventory
   for `render_chart`, `compile_chart`, `validate_chart`, `list_chart_types`,
   or `create_chart_view`. If any of them are present, the server is registered
   and reachable — skip to step 4.

2. **If the tools are missing, `flint-chart-mcp` is not registered.** Ask the
   user to add it, or add it yourself if you can edit their workspace config.

   **Put the file in the right place — this is the single most common failure.**

   | Host                         | Path                          | Top-level key |
   | ---------------------------- | ----------------------------- | ------------- |
   | **VS Code** (workspace)      | `.vscode/mcp.json`            | `servers`     |
   | Claude Code / Claude Desktop | `.mcp.json` at workspace root | `servers`     |
   | Cursor                       | `.cursor/mcp.json`            | `servers`     |
   | GitHub Copilot CLI           | `~/.copilot/mcp-config.json`  | `mcpServers`  |

   The schema is identical across the first three, which is exactly why the
   wrong path looks like it should work. **VS Code never reads a workspace-root
   `.mcp.json`** — and it reports no error, because it isn't parsing a broken
   file, it's reading no file at all. If a user says "I added the config and
   nothing happened," check the path before anything else.

   **Copilot CLI differs twice over:** different path _and_ a different
   top-level key (`mcpServers`, not `servers`). A `servers` block pasted there
   fails just as silently. Prefer telling the user to run `/mcp add` inside a
   CLI session and let it write the file. The path is overridable via
   `$COPILOT_HOME`.

   Always **merge** into any existing config rather than overwriting it —
   clobbering the file destroys whatever other servers the user had.

   ```jsonc
   // .vscode/mcp.json (VS Code) — merge with any existing "servers" map
   {
     "servers": {
       "flint": {
         "type": "stdio",
         "command": "node",
         "args": ["skills/setup-dependencies/scripts/runtime-launcher.mjs", "flint"],
       },
     },
   }
   ```

   - `"type": "stdio"` is optional in some hosts but always declare it —
     omitting it makes transport-related failures harder to diagnose.
   - Run `setup-dependencies` once after install or update. It previews
     npm's configured registry and exact package set before asking to apply.
   - Runtime calls `node <private-runtime>/launch.mjs flint`; it starts no npm
     or npx process. Missing private state routes back to setup.
   - Do not run version-discovery commands, pass `--registry`, edit `.npmrc`,
     or install these binaries globally. npm configuration is the registry
     authority; missing packages route back to setup.
   - **Hardened deployment** (only inline `data.values` accepted, no local
     `data.url` files): append `"--disable-file-reference"` to `args`.

3. **After adding, the host must reload for MCP servers to spawn.** VS Code:
   `Ctrl+Shift+P` → "Developer: Reload Window". Claude Desktop / Cursor:
   restart the app.

4. **Verify.** Call `list_chart_types` with `{ "backend": "vegalite" }`. If it
   returns the chart catalog, the server is up.

5. **If the tools still do not appear, isolate which half is broken before
   guessing.** The server and the client fail identically from chat. If the
   user has the plugin repo checked out, `node scripts/verify-install.mjs`
   does this in one step; otherwise probe the server yourself — pipe a
   handshake plus a `tools/list` into the binary over stdio and read the
   response. A `serverInfo` block followed by a `tools` array proves the server
   is healthy and the fault is config, trust, or session staleness. Then work
   down this list:
   1. **Trust prompt.** VS Code will not start a local stdio server until you
      approve it. `Ctrl+Shift+P` → **MCP: List Servers** → pick `flint` →
      **Start**, and watch for the approval dialog.
   2. **Server output.** Same menu → **Show Output**. Startup crashes surface
      there and nowhere else.
   3. **Restart the chat session.** A window reload is not always enough — the
      agent's tool inventory can stay stale until the session itself restarts.
   4. **HTTP transport only:** an HTTP server needs OAuth authorization after
      starting, which is a separate step from trust. A server can be
      configured and started yet still unauthorized.

6. **For deeper MCP config** — HTTP transport, allowed-host lists, deployment
   patterns, full CLI reference — see the canonical MCP doc:
   <https://microsoft.github.io/flint-chart/#/mcp>. Point the user there for
   anything beyond the stdio install path documented above.

### For project code integration

Only needed if the user asked you to write code that **imports** `flint-chart`
directly (not to render via MCP).

1. **Check the project's `package.json`** for `flint-chart` in `dependencies`
   or `devDependencies`. If present, skip to step 3.

2. **If missing, use the project's approved dependency workflow.** Preserve its
  lockfile and configured registry; never probe another registry or select a
  newer package version automatically. The Flint library version must match
  the project's approved compatibility decision.

   ```bash
  npm install --save-exact flint-chart@0.5.1
   ```

  Add renderer peer dependencies only through the same project dependency
  policy; do not use this skill to discover or upgrade their versions.

3. **Import in code:**

   ```ts
   import {
     assembleChartjs,
     assembleECharts,
     assembleVegaLite,
   } from "flint-chart";
   const spec = assembleVegaLite(input); // or assembleECharts / assembleChartjs
   ```

### For Python

Not yet published to PyPI (as of 2026-07-24). Use the npm package or MCP
server for released workflows until the Python release lands.

## When the user wants more than a spec

First decide which workflow the user is asking for:

- **Spec authoring only:** return a `ChartAssemblyInput` or its
  `semantic_types` + `chart_spec` pieces. Do not install packages or write
  renderer code unless asked.
- **MCP chart output:** if Flint MCP tools are available, **default to
  `create_chart_view`** only for a Vega-Lite chart when the host supports MCP
  App UIs — it opens an interactive, live-rendered SVG view with a
  customization panel. For ECharts or Chart.js, use `render_chart` for a static
  artifact or `compile_chart` for backend-native JSON. `render_chart` emits SVG
  or PNG for Vega-Lite/ECharts and PNG only for Chart.js. Use `validate_chart`
  to check a spec without rendering and `list_chart_types` when you need the
  supported chart catalog.
- **Project integration, only when the user asks for code:** add Flint to an
  app, notebook, script, or agentic product, install/import the library, and
  call an assembler in code. Keep the same `ChartAssemblyInput` contract, then
  let the host render the backend result.

For MCP clients, the server uses an exact cache-first package:

```bash
node "skills/setup-dependencies/scripts/runtime-launcher.mjs" flint
```

For JavaScript or TypeScript projects, use the approved project dependency
workflow and preserve the lockfile:

```bash
  npm install --save-exact flint-chart@0.5.1
```

Do not add or upgrade renderer dependencies unless the user explicitly requests
project integration and approves the project's dependency changes.

Then compile with the requested backend:

```ts
import {
  assembleChartjs,
  assembleECharts,
  assembleVegaLite,
} from "flint-chart";

const vegaLiteSpec = assembleVegaLite(input);
const echartsOption = assembleECharts(input);
const chartjsConfig = assembleChartjs(input);
```

Python support is planned for a later release. Until the PyPI package is
published, use the npm package or MCP server for released workflows.

```ts
interface ChartAssemblyInput {
  // Bound by the HOST or by you, depending on the situation (see below).
  data: { values: any[] } | { url: string };
  semantic_types?: Record<string, string>; // field → semantic type  ← you write this
  chart_spec: {
    //                        ← you write this
    chartType: string; // e.g. "Scatter Plot"
    title?: string; // claim-bearing headline for a standalone Vega-Lite chart
    subtitle?: string; // measure, population, period, and units
    encodings: Record<string, EncodingValue>; // channel → { field, ... } (or array)
    baseSize?: { width: number; height: number }; // target layout size, default 400×320
    canvasSize?: { width: number; height: number }; // optional hard ceiling on stretch
    chartProperties?: Record<string, any>; // per-chart tuning (optional)
  };
  options?: Record<string, any>; // global layout options (rarely needed)
  field_display_names?: Record<string, string>; // readable axis / legend labels
  theme_spec?: string | { extends?: string; [key: string]: any };
}
```

## Carry the Big Idea into the chart

For a standalone chart, use the Chart Brief as the source of its presentation
text:

- `chart_spec.title` states the finding in a concise sentence. It is not a
  topic label or an axis title.
- `chart_spec.subtitle` supplies the reading context: measure, population,
  period, and units.
- Omit both only when a surrounding caption already supplies the same reading,
  such as a sparkline in a table or a dashboard tile beneath a titled panel.

Flint `0.5.1` realizes the title and subtitle in the Vega-Lite backend. When
ECharts or Chart.js is the delivery target, keep the authored text with the
`ChartAssemblyInput` and make it visible in the surrounding artifact after
inspecting the compiled result. Do not move the claim into `theme_spec`:
themes govern presentation, while title and subtitle state what the reader is
meant to understand.

## Calendar Heatmap in Flint 0.5.1

Use `"Calendar Heatmap"` when the question is about daily intensity, recurrence,
or gaps over a long time span. Bind `x` to a date field and `color` to the daily
measure; Flint sums multiple rows from the same day into one GitHub-style
week-by-week cell.

Calendar Heatmap is available on the `vegalite` and `echarts` backends in the
reviewed `0.5.1` runtime. For an interactive MCP App use Vega-Lite with
`create_chart_view`; use `render_chart` or `compile_chart` for ECharts. It is
not listed for Chart.js, so choose a standard `Heatmap` or another supported
alternative there. Always call `list_chart_types` when the runtime version is
unknown or has changed.

## Choose a visual theme

Call `list_themes` when the audience or tone calls for a coherent house style.
Use a preset ID beside `chart_spec`, for example `theme_spec: "economist"`, or
load `flint-theme` for a custom or inherited ThemeSpec. ThemeSpec controls
presentation and compiler behavior; it does not choose fields, aggregation,
filtering, sorting, titles, or values.

Flint `0.5.1` themes apply to Vega-Lite. ECharts and Chart.js ignore ThemeSpec,
so do not claim cross-backend parity. For a custom system, validate the bare
ThemeSpec in Theme Lab and inspect a representative chart corpus before using it
in a deliverable.

## How data gets bound

Use the binding mode that matches the runtime. Do not mix them.

1. **Direct MCP rendering: embed rows.** When calling `render_chart`,
   `compile_chart`, or `validate_chart`, the tool arguments are JSON. If the
   data is small or already transformed by another tool, pass it as
   `data: { values: [...] }`. Do not pass runtime variable names in
   MCP tool calls — the MCP server cannot see your local variables.
2. **Direct MCP rendering: reference a local file.**
   The `flint-chart-mcp` server can load `data: { url: "..." }` from local
   `.json`, `.csv`, or `.tsv` files. By default any local file the agent can
   name is readable (relative paths resolve against the working directory); a
   hardened deployment may reject local file references entirely via
   `--disable-file-reference` (or `FLINT_MCP_DISABLE_FILE_REFERENCE`), in which
   case pass rows inline with `data.values`. Remote URL
   fetching is disabled. If the data must be transformed first, use a
   coding/data tool to write a small prepared file, then reference that file.
3. **Generated application or notebook code: bind runtime variables.** If the
   user asks you to add Flint to code, write normal data-loading code first and
   pass a real runtime value, e.g. `data: { values: rows }`, to
   `assembleVegaLite`, `assembleECharts`, or `assembleChartjs`. This variable
   pattern is for generated code, not for MCP tool calls.

For spec-only answers, return the `semantic_types` and `chart_spec` pieces and
state how the host should bind data. In the worked examples below, `data` is
shown as `{ values: [] }` to signal "host binds this" — focus on `chart_spec`
and `semantic_types`.

## Data transformation before charting

Flint is a chart compiler, not a data-wrangling layer. If the chart needs grouped
totals, time buckets, filters, joins, pivots, derived ratios, or a long-form
table, transform the data first with a host tool, then bind the prepared table
(see "How data gets bound"). Pick semantic types and channels for the transformed
columns, not for columns that no longer exist.

**Sanity-read the values first — don't chart blind.** Inspect the actual data
with your data tool (distinct values per category column, min/max per measure),
not just the column names, and watch for:

- **Embedded totals.** A category column may mix an aggregate level with its
  parts (e.g. `all` alongside `cage-free`/`caged`, or a `Total` region). Charting
  the total with its parts double-counts and flattens the parts — keep one or the
  other on a stacked/grouped/colored channel, not both.
- **Units.** Check whether a rate is a fraction (0–1) or already a percent
  (0–100) before tagging it `Percentage`; don't scale twice.
- **One real entity.** If your breakdown column has a single distinct value, the
  per-group chart collapses to one mark — the intended breakdown is likely a
  different column.

## Post-Flint style customization

Stay at the Flint level for structure (data, chart type, channels, transforms,
sizing, properties) — Flint specs stay portable and regenerate safely. Drop to
backend JSON only after a valid Flint chart exists, and only for a narrow
presentation change Flint does not expose (exact axis/legend/mark styling,
titles, annotations, reference lines, layout polish). Never use it to change the
data, chart type, field mappings, or transforms — fix those upstream.

For a Vega-Lite-specific style tweak:

1. Author and validate the Flint `ChartAssemblyInput`.
2. Render or inspect the Flint chart first, when possible.
3. Call `compile_chart` with `backend: "vegalite"`.
4. Make the smallest necessary style/presentation edit to the returned
   Vega-Lite spec.
5. Render the edited spec in the host environment with a Vega-Lite renderer.

This edited Vega-Lite spec is no longer a portable Flint spec. Do not send it to
`render_chart`; use `render_chart` only for Flint `ChartAssemblyInput`.

**Verification is mandatory here.** Once you leave the Flint level, the MCP
server's validation no longer protects you — an edited spec can render a
plausible-looking chart that is silently wrong. Load the `render-verify` skill:
open the result, read its console errors, and check it against the failure
catalog before declaring it done.

## Publication config preset (books, reports, exec-facing)

When the render target is a book chapter, a print report, or an exec-facing
document, three settings routinely need to be pinned across every chart in the
artifact so the visuals read as one voice. This is a Vega-Lite `config` block
you can drop into the compiled spec (via Step 3 semantic types →
`compile_chart` → backend edit as described above).

> **Print variant of the brand palette.** The categorical range
> below (blue-800 / amber-700 / green-700 / gray-500 / red-700) is the
> **print-quality variant** of the Alex ACT `chart.categorical` palette. The
> **screen variant** (`#10b981` / `#0ea5e9` / `#f59e0b` / `#8b5cf6` / `#ef4444`)
> lives in your project's `.github/config/brand-palette.json`. Same 5-role
> semantic categorical, deeper contrast for paper.

Pin this once at the top of the artifact's chart set; regenerated charts
inherit it without per-chart overrides.

```json
{
  "config": {
    "background": "transparent",
    "font": "Inter, system-ui, sans-serif",
    "axis": {
      "labelColor": "#6b7280",
      "titleColor": "#1f2937",
      "gridColor": "#e5e7eb",
      "labelFontSize": 12,
      "titleFontSize": 13
    },
    "title": {
      "color": "#1f2937",
      "fontSize": 18,
      "fontWeight": 700,
      "anchor": "middle"
    },
    "range": {
      "category": ["#1e40af", "#b45309", "#15803d", "#6b7280", "#b91c1c"]
    }
  }
}
```

**Semantic discipline in the categorical range** — the palette carries meaning
across the artifact, so use each color only for its assigned role:

- `#1e40af` (blue-800) — correct / principled / primary emphasis
- `#b45309` (amber-700) — Composition family / warning / footer takeaway
- `#15803d` (green-700) — approval / correction
- `#6b7280` (gray-500) — muted / de-emphasised
- `#b91c1c` (red-700) — rejection / critique / target line

**Report typography scale** for the HTML surrounding the chart (not the chart
itself):

| Role                       | Style                                                             |
| -------------------------- | ----------------------------------------------------------------- |
| Report title               | 18pt / 700 / `#1f2937`                                            |
| Section header             | 14pt / 700 / `#1f2937`                                            |
| Body copy                  | 15-16px / `#1f2937` (text) or `#6b7280` (asides)                  |
| REJECTED / APPROVED badges | 12pt / 700 white on red-700 or green-700, `rx="3"` 80x20 pill    |

Print-legibility floor for figures embedded in the artifact: 12px at a 640
viewBox is 5.93pt — the instructional minimum. For the full print-legibility
grammar (formula, `data-print-role` markers, text-fits ladder), the Tailwind
semantic palette, and the composition idioms (BEFORE/AFTER paired panels,
numbered critique callouts, family-band abstracts, 5-Visual Rule dashboards),
see the [`print-svg-style-guide`](../print-svg-style-guide/SKILL.md) skill.
For the engineering discipline that emits SVGs conforming to that guide
(hand-authored `.mjs` generators, `data-sha256` audit hash, dataset-first with
contract tests, dataset inversion), see the
[`figure-generator`](../figure-generator/SKILL.md) skill.

Adapted from a published decision-analysis book's figure-authoring practice.

## Attribution

Chart-selection framework (§0 below) distilled from standard visualization
literature — Cole Nussbaumer Knaflic (_Storytelling with Data_), Andy Kirk
(_Data Visualisation_), Stephen Few (_Show Me the Numbers_, _Information
Dashboard Design_), Wexler / Shaffer / Cotgreave (_Big Book of Dashboards_). For
per-chart design tips and the full 48-chart catalog, see _The Defensible
Decision_ chart gallery: <https://www.thedefensibledecision.com/gallery/chart-gallery.html>.
For live examples of every Flint `chartType` across all backends, organized by
semantic category (Bar & Column / Line & Area / Scatter & Points / Distributions
/ Circular & Radial / Tables & Multi-Dimensional / Maps), see the canonical
Flint gallery at <https://microsoft.github.io/flint-chart/#/gallery/vegalite>
(swap `/vegalite` for `/echarts` or `/chartjs` to view the other backends).
flint-chart itself is a Microsoft Research + IDEAS Lab (Renmin University)
project — canonical docs:
<https://microsoft.github.io/flint-chart/#/documentation/getting-started>
(getting started, API reference, architecture, chart-template extension),
<https://microsoft.github.io/flint-chart/#/mcp> (MCP server deployment + full
CLI), and <https://microsoft.github.io/flint-chart/> (project home + live
editor).

## Step 0 — pick the chart (when the user hasn't said which one)

**Skip this step** if the user already named the chart type (e.g. "scatter of
weight vs mpg"). Jump to Step 1 and author the spec. Otherwise, work down this
list before choosing a `chartType`.

### 0.1 One-sentence message — the Big Idea

Before choosing a chart, establish the message it should carry. **Load the
`chart-big-idea` skill and run it now** — look in
`.github/skills/local/chart-big-idea/SKILL.md` first (heir-installed), then
`skills/chart-big-idea/SKILL.md` (baseline).

It does four things this step cannot do inline:

- **Reads the surrounding context first** — the prose next to the insertion
  point, the ticket, the section heading, prior captions — so you do not ask the
  user to re-articulate a claim they already wrote.
- **Questions the intent** — whether the chart should exist at all, and whether
  the stated purpose is the real one. If the intended message and the data
  disagree, that surfaces here rather than after rendering.
- **Elicits the Big Idea** with a three-question ladder, one question at a time,
  when it is not written down anywhere.
- **Asks the TRADITIONAL vs INNOVATIVE style stance**, which changes the
  chartType you pick in §0.2.

The output is a compact Chart Brief. Treat it as the constraint on everything
below: §0.2 selection, §0.4 coverage, and the spec you author in Steps 1-3.

**If that skill is not available**, do the compact version inline
(Knaflic — _Storytelling with Data_):

- What is your unique point of view?
- What is at stake?
- Express it as a complete sentence, not a phrase.

If you cannot write the sentence, ask the user for context before drawing.
"Show sales" is a phrase; "Q4 sales dropped 18% in APAC — that's where our
attention should go this quarter" is a sentence. The sentence shape drives the
chart choice.

### 0.2 Question → family → chart

> **Deeper reference**: the [`chart-vocabulary`](../chart-vocabulary/SKILL.md) skill carries the full 7-goal × ~30-chart catalog, CSAR evaluation loop, override decision table, and 5-visual rule. Reach for it when the 7 rows below aren't enough, when evaluating an AI-suggested chart, or when the artifact will be hand-authored (not rendered via Flint).

| Analytical question            | Family       | Primary chart                                                                                                     | Alternates                                                                                                                                                                                                                                                                               |
| ------------------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Rank or compare categories?    | Comparison   | `Bar Chart` (2-15 items; horizontal orientation for long labels)                                                  | `Grouped Bar Chart` (2-4 series), `Stacked Bar Chart` (composition + total; use `stackMode: normalize` for 100% stacked), `Slope Chart` (before/after 2 periods), `Bar Chart` with `row`/`column` facet (many items, aka Small Multiples), `Waterfall Chart` (sequential adds/subtracts) |
| Change over continuous time?   | Trend        | `Line Chart`                                                                                                      | `Area Chart` (volume emphasis), `Bar Chart` + `Line Chart` combo via multi-encoding `y: ["bars", "line"]` (dual metric with different scales), `Sparkline` (in-table trend)                                                                                                              |
| How are values distributed?    | Distribution | `Histogram` (one variable)                                                                                        | `Boxplot` (compare groups + stats), `Violin Plot` (compare + shape, Vega-Lite), `Strip Plot` (every point matters), `Density Plot` (smooth shape), `ECDF Plot` (cumulative)                                                                                                              |
| Correlation between variables? | Relationship | `Scatter Plot`                                                                                                    | `Scatter Plot` with `size` channel (3 vars, aka Bubble), `Regression` (with fit line), `Connected Scatter Plot` (trajectory over time), `Parallel Coordinates` (many vars, ECharts)                                                                                                      |
| Part of a whole?               | Proportion   | `Bar Chart` (most accurate) or `Stacked Bar Chart` with `stackMode: normalize`                                    | `Pie Chart` (**only** if one slice dominates ≥60% OR comparing to 50%), donut (use the center for a KPI) — `Donut Chart` on Vega-Lite, `Doughnut Chart` on Chart.js, `Pie Chart` + `innerRadius` on ECharts, `Treemap` (many/hierarchy, ECharts), `Sunburst Chart` (interactive hierarchy, ECharts), `Funnel Chart` (sequential stages, ECharts)                       |
| Flow between stages?           | Flow         | `Sankey Diagram` (linear flow, ECharts)                                                                           | `Streamgraph` (aesthetic, precision sacrificed), `Heatmap` (matrix pattern), `Chord`-like flows → use `Sankey Diagram` instead                                                                                                                                                           |
| Progress toward a target?      | KPI          | `Bullet Chart` (Few's superior alternative to gauges: actual + target + qualitative ranges in one horizontal bar) | `KPI Card` (single number with delta), `Sparkline` (in-table trend), `Gauge Chart` (ECharts — reserve for high-visibility single-KPI tiles only)                                                                                                                                         |

### 0.3 Anti-patterns — don't recommend

- **Pie with >5 slices** — humans can't compare angles; use `Bar Chart` or `Stacked Bar Chart` with `stackMode: normalize`
- **Pie without a dominant slice** — if no category is ≥60% or the story isn't "X vs the rest", use a `Bar Chart`
- **Word cloud for real analysis** — position and word length distort; use `Bar Chart` of top-N terms (not in Flint; export to another tool)
- **Dual-axis combo without justification** — dual axes mislead by aligning unrelated scales; consider two separate charts
- **Truncated Y-axis on bars** — exaggerates differences; always start `Bar Chart` at zero (Flint does this by default; don't override)
- **Streamgraph when precise values matter** — the flowing baseline sacrifices readability; use `Area Chart` instead
- **Gauge over Bullet** — `Bullet Chart` packs actual + target + qualitative bands in less space with more precision
- **More than 5 series on a Line Chart** — becomes a spaghetti chart; use `row`/`column` facet (Small Multiples) or highlight one series and gray out the rest

### 0.4 Flint coverage — substitutes when the ideal chart isn't native

Some charts from wider visualization literature aren't in Flint's registry.
Recommend the substitute, not the missing chart:

| Ideal chart                                                             | Flint substitute                                               | How                                                                                     |
| ----------------------------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| Waffle Chart (10×10 grid %)                                             | `Bar Chart` or `Stacked Bar Chart` with `stackMode: normalize` | Labeled percentage bar communicates the same "N out of 100"                             |
| Chord Diagram (circular flows)                                          | `Sankey Diagram` (ECharts backend)                             | Linear flow is easier to read anyway                                                    |
| Pareto Chart (bars + cumulative %)                                      | `Bar Chart` + `Line Chart` via multi-encoding                  | Sort bars descending, overlay cumulative-% line                                         |
| Beeswarm Plot (every point)                                             | `Strip Plot` with `stepWidth`, `pointSize`, `opacity`          | Jittered points instead of packed; same "every dot is real" story                       |
| Ridgeline Plot (many densities)                                         | `Violin Plot` with `row` facet                                 | Density curves stacked per group                                                        |
| Small Multiples                                                         | any chart with `row` or `column` encoding                      | Native facet support                                                                    |
| Word Cloud / Sentiment / NPS Gauge / Likert / Mind Map                  | Not in Flint's scope                                           | Export prepared data to Power BI / Tableau / dedicated tool                             |
| Hierarchy visualization                                                  | `"Tree"` (ECharts only)                                       | Use `detail` for node labels, `color` for parent grouping, and `size` for values; validate the installed catalog before authoring |
| Control Chart / Run Chart / Pareto / Process Capability (SPC)           | Not in Flint's scope                                           | Use a dedicated SPC / Six Sigma tool; Flint isn't built for statistical process control |
| Decomposition Tree / Key Influencers / Smart Narrative (AI-Powered)     | Not in Flint's scope                                           | These are Power BI features; Flint is a chart compiler, not an analytics engine         |
| Table / Matrix (precise value lookup)                                   | Use a data table (not Flint)                                   | Stephen Few's rule — tables for lookup, graphs for pattern                              |

This table is a **catalog** boundary: Flint does not offer these chart types.
[`ascii-chart`](../ascii-chart/SKILL.md) carries a separate **medium** boundary
listing forms ASCII cannot carry at all, such as pie, donut, sunburst, violin,
and streamgraph, because angle and smooth curves need resolution a character
cell does not have. The two lists barely overlap and are not interchangeable: a
chart absent here may render fine in ASCII, and a chart Flint renders well may
be impossible in ASCII.

### 0.5 When to fetch a deep reference

Four reference layers, ordered by cost. Fetch the cheapest one that answers the question.

**Chart selection — "which chart for which analytical question?"**

Fetch [The Defensible Decision — Complete Chart Gallery](https://www.thedefensibledecision.com/gallery/chart-gallery.html) when:

- The user asks about a chart not in §0.2 or §0.4
- The user asks "what other charts could work here?"
- The user needs per-chart design tips (axis handling, color, labeling, accessibility)
- The compact table above is ambiguous for the case at hand

The gallery has 48 charts across 10 families with per-chart 💡 tips, distilled from Knaflic / Kirk / Few / Wexler.

**Chart capability and language — runtime (fastest, always matches the pinned server version)**

Two runtime paths that need no fetch and always reflect the actual server the user has installed:

- **`list_chart_types` MCP tool** — call with `{ backend: 'vegalite' | 'echarts' | 'chartjs' }` to get the current server's chart-type catalog and encoding channels. Zero-fetch; matches whatever `flint-chart-mcp` version is pinned.
- **`flint://chart-types` MCP resource** — a browsable version of the same catalog, exposed as an MCP resource for hosts that surface resources in their UI (e.g., Claude Desktop). Same data, host-native display.
- **`flint://agent-skill` MCP resource** — the complete version-matched chart
  language and authoring contract. Prefer it over copied type and property tables.
- **`list_themes` + `flint://theme-skill`** — discover preset IDs and load the
  version-matched ThemeSpec grammar. Illustrator's `flint-theme` skill adds the
  Theme Lab and visual-QA loop.

Prefer these over external references when the question is "does the server I'm actually talking to render `<chartType>` on `<backend>`?" They cost nothing and cannot go stale.

> **0.5.x note.** The underlying library's backend-neutral recommendations,
> named views, and chart transformations surface through the interactive
> Vega-Lite's `create_chart_view` MCP App rather than separate tools. Use it to
> explore compatible arrangements without changing the data or semantic truth
> layer. ECharts and Chart.js workflows use static rendering or compilation;
> headless workflows keep using §0.2 plus `list_chart_types`.

**Chart capability — gallery (canonical live examples)**

Fetch the canonical [Flint gallery](https://microsoft.github.io/flint-chart/#/gallery/vegalite) (maintained by the microsoft/flint-chart team; always tracks the current release) when:

- You need to confirm Flint actually renders a specific `chartType` on a specific backend. Swap the trailing `/vegalite` → `/echarts` or `/chartjs` to view the same catalog for other backends.
- The user is deciding between Vega-Lite vs ECharts vs Chart.js and wants to see the same chart family rendered natively on each backend.
- You need a live example of a chart variant (e.g. a _faceted_ boxplot, a _dodge = local_ grouped bar, a _sparse_ streamgraph) — the gallery shows multiple named variants per `chartType`.
- You want the canonical semantic grouping (Bar & Column / Line & Area / Scatter & Points / Distributions / Circular & Radial / Tables & Multi-Dimensional / Maps) that Flint itself uses to organize its chart registry.

This is the authoritative reference for **what Flint actually does**; §0.2–0.4 above is the compact map, but the gallery is the source of truth for edge cases and backend-specific behavior.

**Chart capability — developer documentation**

Use the official [Flint documentation](https://microsoft.github.io/flint-chart/#/documentation/overview)
for language design, semantics, layout, APIs, and backend architecture. Runtime
resources remain authoritative for the installed server's exact vocabulary.
The library documents Plotly and Excel, but the `0.5.1` MCP tool schema exposes
only Vega-Lite, ECharts, and Chart.js; treat other backends as project-code
integration, not MCP capability.

**Rule of thumb**: Defensible Decision answers "should I use a bar or a boxplot?"; `list_chart_types` and the Flint gallery answer "will Flint's `Bar Chart` on ECharts backend do what I need?"; the deep reference (`docs/reference-*.md`) answers "what exact channels and properties does that combination support?".

### 0.6 Design principles (invoke, don't substitute for reading)

Short-form pointers to the underlying literature. Invoke these when justifying
a choice; read the books themselves for depth.

- **Trustworthy · Accessible · Elegant** (Kirk) — check the chart against all three before shipping
- **Tables for lookup, graphs for pattern** (Few) — if the user wants exact values, a data table beats any chart; use `Bar Table` (Flint) only when you want compact bars with labels
- **Explanatory vs exploratory** (Knaflic) — for stakeholder communication, show the pearl, not the oyster bed; strip clutter aggressively
- **Bullet > Gauge Chart** (Few) — always prefer `Bullet Chart` for KPI-vs-target; reserve `Gauge Chart` for large single-KPI tiles
- **Gestalt** (Knaflic Ch. 3) — group with proximity, distinguish with color/shape, connect with lines, enclose with backgrounds
- **Dashboard = one screen, no scrolling, reduce to essence** (Few — _Information Dashboard Design_) — if it doesn't fit, cut, don't scroll

---

## Step 1 — pick `chartType`

Use one of the registered names **exactly**. Vega-Lite is the default and
broadest backend; the table below lists each Vega-Lite chart type, the
channels it accepts, and its tuning properties (see 

…(truncated)
