ChartKit 0.5.0 · MIT

Charts an agentcan write and aserver can render.

One JSON spec, validated and repaired locally, drawn as SVG in any framework or none.

Latency, p50 vs p95

Milliseconds, rolling 8 weeks

p50 stays near 50 milliseconds while p95 climbs from 62 to 92.p50 stays near 50 milliseconds while p95 climbs from 62 to 92.2040608010012345678p50p95
41chart types, one spec shape. Click any to render it above.
Open the gallery →

On the server

Renders in Node.No browser needed.

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
Server render time by chart type on a log scale from 0.01 ms to 100 ms. ChartKit's 48-bar chart is 0.26 ms. Next library, Observable Plot: 2.26 ms.Server render time by chart type on a log scale from 0.01 ms to 100 ms. ChartKit's 48-bar chart is 0.26 ms. Next library, Observable Plot: 2.26 ms.ChartKit, bar, 0.26Observable Plot, bar, 2.26Victory, bar, 5.28ECharts, bar, 5.45Vega-Lite, bar, 8.47MUI X Charts, bar, 10.09ApexCharts, bar, 10.58Nivo, bar, 25.73ChartKit, pie, 0.03ApexCharts, pie, 2.41Victory, pie, 2.67ECharts, pie, 2.94Nivo, pie, 5.49MUI X Charts, pie, 6.19Vega-Lite, pie, 6.47ChartKit, donut, 0.03ApexCharts, donut, 1.73Victory, donut, 1.83ECharts, donut, 2.50Nivo, donut, 4.50MUI X Charts, donut, 5.85Vega-Lite, donut, 6.34ChartKit, radar, 0.08MUI X Charts, radar, 2.81ApexCharts, radar, 3.00ECharts, radar, 4.16Nivo, radar, 6.72ChartKit, treemap, 0.78ApexCharts, treemap, 3.78ECharts, treemap, 7.80Nivo, treemap, 11.69bar48 bars0.26 mspie8 slices0.03 msdonut8 slices0.03 msradar8 axes0.08 mstreemap48 tiles0.78 ms0.101.0010.00
Server render time by chart type on a log scale from 0.01 ms to 100 ms. ChartKit's 48-bar chart is 0.26 ms. Next library, Observable Plot: 2.26 ms.Server render time by chart type on a log scale from 0.01 ms to 100 ms. ChartKit's 48-bar chart is 0.26 ms. Next library, Observable Plot: 2.26 ms.ChartKit, bar, 0.26Observable Plot, bar, 2.26Victory, bar, 5.28ECharts, bar, 5.45Vega-Lite, bar, 8.47MUI X Charts, bar, 10.09ApexCharts, bar, 10.58Nivo, bar, 25.73ChartKit, pie, 0.03ApexCharts, pie, 2.41Victory, pie, 2.67ECharts, pie, 2.94Nivo, pie, 5.49MUI X Charts, pie, 6.19Vega-Lite, pie, 6.47ChartKit, donut, 0.03ApexCharts, donut, 1.73Victory, donut, 1.83ECharts, donut, 2.50Nivo, donut, 4.50MUI X Charts, donut, 5.85Vega-Lite, donut, 6.34ChartKit, radar, 0.08MUI X Charts, radar, 2.81ApexCharts, radar, 3.00ECharts, radar, 4.16Nivo, radar, 6.72ChartKit, treemap, 0.78ApexCharts, treemap, 3.78ECharts, treemap, 7.80Nivo, treemap, 11.69bar48 bars0.26 mspie8 slices0.03 msdonut8 slices0.03 msradar8 axes0.08 mstreemap48 tiles0.78 ms0.101.0010.00
Server render time by chart type on a log scale from 0.01 ms to 100 ms. ChartKit's 48-bar chart is 0.26 ms. Next library, Observable Plot: 2.26 ms.Server render time by chart type on a log scale from 0.01 ms to 100 ms. ChartKit's 48-bar chart is 0.26 ms. Next library, Observable Plot: 2.26 ms.ChartKit, bar, 0.26Observable Plot, bar, 2.26Victory, bar, 5.28ECharts, bar, 5.45Vega-Lite, bar, 8.47MUI X Charts, bar, 10.09ApexCharts, bar, 10.58Nivo, bar, 25.73ChartKit, pie, 0.03ApexCharts, pie, 2.41Victory, pie, 2.67ECharts, pie, 2.94Nivo, pie, 5.49MUI X Charts, pie, 6.19Vega-Lite, pie, 6.47ChartKit, donut, 0.03ApexCharts, donut, 1.73Victory, donut, 1.83ECharts, donut, 2.50Nivo, donut, 4.50MUI X Charts, donut, 5.85Vega-Lite, donut, 6.34ChartKit, radar, 0.08MUI X Charts, radar, 2.81ApexCharts, radar, 3.00ECharts, radar, 4.16Nivo, radar, 6.72ChartKit, treemap, 0.78ApexCharts, treemap, 3.78ECharts, treemap, 7.80Nivo, treemap, 11.69bar48 bars0.26 mspie8 slices0.03 msdonut8 slices0.03 msradar8 axes0.08 mstreemap48 tiles0.78 ms0.101.0010.00

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.

ChartKitvs4 othersPlotEChartsChart.jsRechartsmodelmedian
ChartKit's median is 94 tokens, 3.5× below Plot at 332.ChartKit's median is 94 tokens, 3.5× below Plot at 332.ChartKit median 94Plot median 332ECharts median 492Chart.js median 808Recharts median 1,358Grok 4.7, ChartKit, 78.5GPT-6.1 Terra, ChartKit, 82.5GPT-6.1 Sol, ChartKit, 86.5GPT-6 Astra, ChartKit, 88GPT-6 Luna, ChartKit, 94Claude Fable 5.1, ChartKit, 115Claude Sonnet 5.5, ChartKit, 124Claude Opus 5.5, ChartKit, 127Claude Haiku 5.5, ChartKit, 133Grok 4.7, Plot, 166GPT-6.1 Sol, Plot, 244GPT-6 Astra, Plot, 266Claude Fable 5.1, Plot, 300GPT-6.1 Terra, Plot, 332Claude Sonnet 5.5, Plot, 333Claude Opus 5.5, Plot, 356GPT-6 Luna, Plot, 464Claude Haiku 5.5, Plot, 711Grok 4.7, ECharts, 284Claude Fable 5.1, ECharts, 379Claude Opus 5.5, ECharts, 469GPT-6.1 Terra, ECharts, 488GPT-6.1 Sol, ECharts, 492GPT-6 Astra, ECharts, 536Claude Sonnet 5.5, ECharts, 544GPT-6 Luna, ECharts, 675Claude Haiku 5.5, ECharts, 882Grok 4.7, Chart.js, 444.5GPT-6.1 Sol, Chart.js, 491GPT-6 Astra, Chart.js, 492Claude Fable 5.1, Chart.js, 656GPT-6.1 Terra, Chart.js, 808GPT-6 Luna, Chart.js, 820Claude Sonnet 5.5, Chart.js, 887Claude Opus 5.5, Chart.js, 901Claude Haiku 5.5, Chart.js, 1,193Grok 4.7, Recharts, 365GPT-6 Luna, Recharts, 874GPT-6.1 Sol, Recharts, 1,273Claude Haiku 5.5, Recharts, 1,285GPT-6 Astra, Recharts, 1,358Claude Fable 5.1, Recharts, 1,468Claude Sonnet 5.5, Recharts, 1,499GPT-6.1 Terra, Recharts, 1,594Claude Opus 5.5, Recharts, 1,713← 3.5× fewer than Plot, next bestChartKit78.5–13394 tokPlot166–711332 tokECharts284–882492 tokChart.js444.5–1,193808 tokRecharts365–1,7131,358 tok05001,0001,5002,000
ChartKit's median is 94 tokens, 3.5× below Plot at 332.ChartKit's median is 94 tokens, 3.5× below Plot at 332.ChartKit median 94Plot median 332ECharts median 492Chart.js median 808Recharts median 1,358Grok 4.7, ChartKit, 78.5GPT-6.1 Terra, ChartKit, 82.5GPT-6.1 Sol, ChartKit, 86.5GPT-6 Astra, ChartKit, 88GPT-6 Luna, ChartKit, 94Claude Fable 5.1, ChartKit, 115Claude Sonnet 5.5, ChartKit, 124Claude Opus 5.5, ChartKit, 127Claude Haiku 5.5, ChartKit, 133Grok 4.7, Plot, 166GPT-6.1 Sol, Plot, 244GPT-6 Astra, Plot, 266Claude Fable 5.1, Plot, 300GPT-6.1 Terra, Plot, 332Claude Sonnet 5.5, Plot, 333Claude Opus 5.5, Plot, 356GPT-6 Luna, Plot, 464Claude Haiku 5.5, Plot, 711Grok 4.7, ECharts, 284Claude Fable 5.1, ECharts, 379Claude Opus 5.5, ECharts, 469GPT-6.1 Terra, ECharts, 488GPT-6.1 Sol, ECharts, 492GPT-6 Astra, ECharts, 536Claude Sonnet 5.5, ECharts, 544GPT-6 Luna, ECharts, 675Claude Haiku 5.5, ECharts, 882Grok 4.7, Chart.js, 444.5GPT-6.1 Sol, Chart.js, 491GPT-6 Astra, Chart.js, 492Claude Fable 5.1, Chart.js, 656GPT-6.1 Terra, Chart.js, 808GPT-6 Luna, Chart.js, 820Claude Sonnet 5.5, Chart.js, 887Claude Opus 5.5, Chart.js, 901Claude Haiku 5.5, Chart.js, 1,193Grok 4.7, Recharts, 365GPT-6 Luna, Recharts, 874GPT-6.1 Sol, Recharts, 1,273Claude Haiku 5.5, Recharts, 1,285GPT-6 Astra, Recharts, 1,358Claude Fable 5.1, Recharts, 1,468Claude Sonnet 5.5, Recharts, 1,499GPT-6.1 Terra, Recharts, 1,594Claude Opus 5.5, Recharts, 1,713← 3.5× fewer than Plot, next bestChartKitrange 78.5–13394 tokPlotrange 166–711332 tokEChartsrange 284–882492 tokChart.jsrange 444.5–1,193808 tokRechartsrange 365–1,7131,358 tok05001,0001,5002,000
ChartKit's median is 94 tokens, 3.5× below Plot at 332.ChartKit's median is 94 tokens, 3.5× below Plot at 332.ChartKit median 94Plot median 332ECharts median 492Chart.js median 808Recharts median 1,358Grok 4.7, ChartKit, 78.5GPT-6.1 Terra, ChartKit, 82.5GPT-6.1 Sol, ChartKit, 86.5GPT-6 Astra, ChartKit, 88GPT-6 Luna, ChartKit, 94Claude Fable 5.1, ChartKit, 115Claude Sonnet 5.5, ChartKit, 124Claude Opus 5.5, ChartKit, 127Claude Haiku 5.5, ChartKit, 133Grok 4.7, Plot, 166GPT-6.1 Sol, Plot, 244GPT-6 Astra, Plot, 266Claude Fable 5.1, Plot, 300GPT-6.1 Terra, Plot, 332Claude Sonnet 5.5, Plot, 333Claude Opus 5.5, Plot, 356GPT-6 Luna, Plot, 464Claude Haiku 5.5, Plot, 711Grok 4.7, ECharts, 284Claude Fable 5.1, ECharts, 379Claude Opus 5.5, ECharts, 469GPT-6.1 Terra, ECharts, 488GPT-6.1 Sol, ECharts, 492GPT-6 Astra, ECharts, 536Claude Sonnet 5.5, ECharts, 544GPT-6 Luna, ECharts, 675Claude Haiku 5.5, ECharts, 882Grok 4.7, Chart.js, 444.5GPT-6.1 Sol, Chart.js, 491GPT-6 Astra, Chart.js, 492Claude Fable 5.1, Chart.js, 656GPT-6.1 Terra, Chart.js, 808GPT-6 Luna, Chart.js, 820Claude Sonnet 5.5, Chart.js, 887Claude Opus 5.5, Chart.js, 901Claude Haiku 5.5, Chart.js, 1,193Grok 4.7, Recharts, 365GPT-6 Luna, Recharts, 874GPT-6.1 Sol, Recharts, 1,273Claude Haiku 5.5, Recharts, 1,285GPT-6 Astra, Recharts, 1,358Claude Fable 5.1, Recharts, 1,468Claude Sonnet 5.5, Recharts, 1,499GPT-6.1 Terra, Recharts, 1,594Claude Opus 5.5, Recharts, 1,713← 3.5× fewer than Plot, next bestChartKitrange 78.5–13394 tokPlotrange 166–711332 tokEChartsrange 284–882492 tokChart.jsrange 444.5–1,193808 tokRechartsrange 365–1,7131,358 tok05001,0001,5002,000
78.5–133

ChartKit median tokens, best model to worst. The next lowest median is 166 (Plot on Grok 4.7).

1.0 call

per working chart. repair() fixes specs without the model.

9 / 9

models where ChartKit was the cheapest library. See what the agent wrote →

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."
  }
}
  1. 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
  2. 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
  3. render(spec)SVG · 5.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.

9adapters

One spec. Each adapter prints the SVG on the server. Pick your framework →

chartspec.json
102 tok
{
"version":"1",
"type":"bar",
"data":{"columns":{
"region":["NA","EU","UK","APAC","LATAM","MEA","ANZ","JP"],
"revenue":[42,31,24,27,12,9,8,14]}},
"encoding":{"x":"region","y":{"field":"revenue","format":{"style":"currency","suffix":"M"}}},
"sort":{"order":"descending"},
"a11y":{"alt":"NA leads Q3."}
}
Revenue by region
Q3, $M
Rendered · React

Get started

Two ways in

Install it yourself in a minute, or hand your agent one prompt and let it do the switch.

Install yourself

Pick a framework, copy the command.

npm install @chartkitdev/core @chartkitdev/react

import { Chart } from "@chartkitdev/react";

export function Panel() {
  return <Chart spec={spec} />;
}

npm install @chartkitdev/core @chartkitdev/vanilla

import { mount } from "@chartkitdev/vanilla";

const chart = mount(document.querySelector("#chart"), spec);
chart.update(spec);

npm install @chartkitdev/core @chartkitdev/vue

<script setup>
import { Chart } from "@chartkitdev/vue";
</script>

<template>
  <Chart :spec="spec" />
</template>

npm install @chartkitdev/core @chartkitdev/svelte

<script>
  import { Chart } from "@chartkitdev/svelte";
</script>

<Chart {spec} />

npm install @chartkitdev/core @chartkitdev/astro

---
import { Chart } from "@chartkitdev/astro";
---

<Chart spec={spec} />

npm install @chartkitdev/core @chartkitdev/solid

import { Chart } from "@chartkitdev/solid";

export function Panel() {
  return <Chart spec={spec} />;
}

npm install @chartkitdev/core @chartkitdev/qwik

import { component$ } from "@builder.io/qwik";
import { Chart } from "@chartkitdev/qwik";

export const Panel = component$(() => {
  return <Chart spec={spec} />;
});

npm install @chartkitdev/core @chartkitdev/angular

import { Component } from "@angular/core";
import { Chart } from "@chartkitdev/angular";

@Component({
  standalone: true,
  imports: [Chart],
  template: `<ck-chart [spec]="spec" />`,
})
export class Panel {
  spec = spec;
}

npm install @chartkitdev/core @chartkitdev/element

import "@chartkitdev/element";

const chart = document.querySelector("chart-kit");
chart.spec = spec;

Tell your agent

Paste this. The app stays JavaScript.

Switch the charts in this project to ChartKit.

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>.

For agentsllms.txtSchemaAgent guide →