render() returns an SVG string in Node. There is no browser, no canvas and no DOM. A 48-bar chart takes 0.26 ms. Observable Plot takes 2.26 ms, ECharts 5.45 ms and Vega-Lite 8.47 ms.
0.26ms
48-bar chart, server render. Next library, Observable Plot: 2.26 ms.
Server render by chart type
Milliseconds, log scale. Left is faster.
ChartKitvs7 othersEChartsNivoObservable PlotVictoryApexChartsVega-LiteMUI X Charts
Median of five in Node after one warmup, measured 2026-10-29. A library with no native chart of that type, or no way to render without a browser, is left out of that row. Large line charts are sampled to the plot width, so they are not in this chart. Browser paint times, including the ones we lose, are in the full benchmark matrix →
For the agent
Fewer tokens per working chart.On every model we tested.
Same 42 tasks, nine models, five libraries. The agent writes a short spec instead of a component, so the median is 1.0 model call with a fraction of the output.
3.5×
2.1–5.3× fewer tokens per chart, depending on model.
Output tokens per working chart, by model
Each dot is one model's median. The bar is the spread across nine.
A JSON spec is always shorter than code that imports a library, and these four are code libraries. Vega-Lite, the closest JSON grammar, is not in this eval yet.Review test details and methodology →
Repair
The agent gets a key wrong.repair() fixes it, no model call.
With no docs in the prompt, the model guesses at the spec. validate() says what is wrong and where, and repair() applies the fix as a JSON Patch. Both run locally with no network call, so a wrong first answer does not cost a second request.
21of 21
Failed first answers repaired. 42 tasks, no docs. How it was run →
agent's first answerafter repair()
187 tok
asked Combo chart: rainfall as bars and temperature as a line.
{
"version": "1",
"type": "combo",
"data": [
{"day": "Mon", "rain": 2, "temp": 18},
{"day": "Tue", "rain": 8, "temp": 16},
{"day": "Wed", "rain": 0, "temp": 22}
],
"encoding": {
"x": {"field": "day"},
"y": [
{"field": "rain", "type": "bar"},
{"field": "temp", "type": "line"}
]
},
"a11y": {
"alt": "Combo chart showing rainfall as bars and temperature as a line across three days."
}
}
{
"version": "1",
"type": "combo",
"data": [
{"day": "Mon", "rain": 2, "temp": 18},
{"day": "Tue", "rain": 8, "temp": 16},
{"day": "Wed", "rain": 0, "temp": 22}
],
"encoding": {
"x": {"field": "day"},
"y": [
{"field": "rain", "mark": "bar"},
{"field": "temp", "mark": "line"}
]
},
"a11y": {
"alt": "Combo chart showing rainfall as bars and temperature as a line across three days."
}
}
validate(spec)2 errors
CK1009/encoding/y/0/type "bar" is a combo series mark, not a field type
CK1009/encoding/y/1/type "line" is a combo series mark, not a field type
repair(spec)4 fixs · 0 model calls
add /encoding/y/0/mark = "bar"
remove /encoding/y/0/type
add /encoding/y/1/mark = "line"
remove /encoding/y/1/type
render(spec)SVG · 5.5 KB
agent's first answerafter repair()
173 tok
asked Donut chart of session share by source. Search is the largest slice.
{
"version": "1",
"type": "donut",
"data": [
{"label": "Search", "value": 42},
{"label": "Direct", "value": 28},
{"label": "Social", "value": 18},
{"label": "Email", "value": 12}
],
"encoding": {
"label": "label",
"value": "value"
},
"a11y": {
"alt": "Donut chart showing session share by source with Search as the largest slice at 42%, followed by Direct at 28%, Social at 18%, and Email at 12%."
}
}
{
"version": "1",
"type": "donut",
"data": [
{"label": "Search", "value": 42},
{"label": "Direct", "value": 28},
{"label": "Social", "value": 18},
{"label": "Email", "value": 12}
],
"encoding": {
"x": "label",
"y": "value"
},
"a11y": {
"alt": "Donut chart showing session share by source with Search as the largest slice at 42%, followed by Direct at 28%, Social at 18%, and Email at 12%."
}
}
validate(spec)1 error
CK1009/encoding donut uses encoding.x for the slice label and encoding.y for the value
repair(spec)2 fixs · 0 model calls
move /encoding/label → /encoding/x
move /encoding/value → /encoding/y
render(spec)SVG · 4.2 KB
agent's first answerafter repair()
97 tok
asked Gauge of CPU usage at 41 percent.
{
"version": "1",
"type": "gauge",
"data": {
"value": 41,
"min": 0,
"max": 100
},
"a11y": {
"alt": "A gauge chart showing CPU usage at 41 percent out of a maximum of 100 percent."
}
}
{
"version": "1",
"type": "gauge",
"a11y": {
"alt": "A gauge chart showing CPU usage at 41 percent out of a maximum of 100 percent."
},
"metric": {
"value": 41,
"min": 0,
"max": 100
}
}
validate(spec)1 error
CK1009/metric gauge, kpi, and progress-ring keep the number in metric
repair(spec)2 fixs · 0 model calls
add /metric = {"value": 41, "min": 0, "max": 100}
remove /data
render(spec)SVG · 3.5 KB
A recording, not a live model. Each answer is a first try from the agent eval (round 6, claude-sonnet-4-5, no docs), shown as the model wrote it. The diagnostics, fixes and chart are what validate(), repair() and render() return for it in this build.
Every stack
10 lines of JSON.The same chart everywhere.
A spec is data plus intent, with no components and no chart code. The same JSON draws in React, Vue, Svelte, Solid, Qwik, Angular, Astro, plain JavaScript and a <chart-kit> element.
Install @chartkitdev/core plus the adapter for this framework (@chartkitdev/react, @chartkitdev/vue, @chartkitdev/svelte, @chartkitdev/astro, @chartkitdev/solid, @chartkitdev/qwik, @chartkitdev/angular, @chartkitdev/vanilla, or @chartkitdev/element). Replace each hand-rolled chart with a ChartSpec: version "1", data as an array of rows, encoding maps fields to x and y, and a11y.alt is one factual sentence. Run validate() before render. Vanilla JS draws it with mount(element, spec) from @chartkitdev/vanilla. The custom element sets spec on <chart-kit>.