@opendata-ai/openchart-vue
| Install | |
|---|---|
npm install @opendata-ai/openchart-vue |
|
| Latest Version: | 8.9.1 |
| Vue: | 3 |
| License: | Apache-2.0 |
| Last Updated: | Oct 22, 2026 |
| Links: | GitHub · npm |
@opendata-ai/openchart
Publication-quality data graphics from a JSON spec. You describe what the chart should communicate, and the engine handles scales, label placement, accessibility, and responsive layout. The result reads like a polished infographic, not a developer's debug output.
The spec is a plain JSON object that both humans and LLMs can author. The headless engine means the same spec renders in React, Vue, Svelte, or vanilla JS without code changes.
Because a chart is a JSON document, OpenChart works well as a render target for AI agents: the model writes the spec, validateSpec returns field-level errors it can fix, and updates animate in place. See Built for agents for a walkthrough, and Generating specs for the tool setup.
Interactive Examples · Built for agents
Quick start
npm install @opendata-ai/openchart-react
import { Chart } from "@opendata-ai/openchart-react";
const spec = {
mark: "bar",
data: [
{ language: "Python", popularity: 29 },
{ language: "JavaScript", popularity: 24 },
{ language: "TypeScript", popularity: 17 },
{ language: "Java", popularity: 14 },
{ language: "Go", popularity: 10 },
],
encoding: {
x: { field: "popularity", type: "quantitative" },
y: { field: "language", type: "nominal" },
},
chrome: {
title: "Python leads developer mindshare",
subtitle: "2024 developer survey results",
source: "Source: Stack Overflow",
},
};
function App() {
return (
<div style={{ width: 600, height: 400 }}>
<Chart spec={spec} />
</div>
);
}
That's the whole interface. encoding maps data fields to visual channels. chrome adds editorial framing. The engine figures out the rest.
The fixed-height wrapper is optional. Without one, the chart sizes itself: a 400px budget for the visualization (axes + plot), and titles, legends, and other chrome grow the figure on top of that. Give the wrapper an explicit height and set chromeLayout: 'subtract' when the chart must fit an exact slot; otherwise annotation notes can grow the figure.
Features
| Category | What you get |
|---|---|
| Charts | Bar, line, area, point, circle, arc (pie/donut), lollipop, beeswarm, histogram, density, range, waffle, calendar, parliament |
| Tables | Sort, search, pagination, heatmap cells, sparklines, inline bars, category colors |
| Graphs | Force-directed networks, canvas rendering, node interaction, search, zoom |
| Maps | Choropleth and symbol maps from TopoJSON, plus US state tile grids |
| Flow | Sankey diagrams for multi-stage flows |
| Layout | Layered specs, faceting / small multiples, bar lists |
| Motion | Entrance animations, data-update transitions, scrollytelling stories |
| Chrome | Title, subtitle, source, byline, footer |
| Annotations | Reference lines, highlighted ranges, text callouts |
| Themes | Deep-mergeable config for colors, fonts, spacing. Dark mode: auto, force, or off |
| A11y | Auto-generated alt text, ARIA labels, keyboard navigation, screen reader tables |
| Responsive | Breakpoint-aware layout with adaptive label density, legend position, and placement |
| Rendering | SVG by default, automatic canvas promotion for dense scatter |
| Export | SVG, PNG, JPG, CSV, and GIF (via the optional gifenc peer) |
Tables are a first-class visualization type with heatmaps, sparklines, inline bars, and more.
Installation
| Use case | Install |
|---|---|
| React | npm install @opendata-ai/openchart-react |
| Vue 3 | npm install @opendata-ai/openchart-vue |
| Svelte 5 | npm install @opendata-ai/openchart-svelte |
| Vanilla JS / any framework | npm install @opendata-ai/openchart-vanilla |
| Types only / custom renderer | npm install @opendata-ai/openchart-core @opendata-ai/openchart-engine |
Each package re-exports the types you need, so you typically only install one.
Release candidates publish under the next dist-tag, so a plain install always gets the latest stable. To try one: npm install @opendata-ai/openchart-react@next.
Documentation
| Doc | What's in it |
|---|---|
| OpenStudio | Separate browser authoring app and GitHub Pages demo |
| Getting started | Hands-on tutorial from first chart to custom themes, tables, and graphs |
| Chart types | Catalog of every mark and spec type, with when to reach for each |
| Spec reference | Field-by-field type reference for ChartSpec, TableSpec, and GraphSpec |
| Tables | Column config, sparklines, heatmap cells, sorting and pagination |
| Graphs | Force-directed network layout, node/link encoding, interaction |
| Maps | Choropleth and symbol maps, projection inference, hover semantics |
| Sankey | Flow diagrams, "Other" bucketing, path hover |
| Dashboards | Tile sizing, KPI cards, chrome economy, watermark rules for product UI |
| Design system | Palette, type, spacing, motion, and interaction language behind every default |
| Ranking and change | Patterns for showing movement, deltas, and rank shifts |
| Generating specs | Building specs programmatically and from LLM output |
| Integration guide | Events, controlled tables, export, responsive behavior, vanilla JS lifecycle |
| Accessibility | What's automatic, what's opt-in (alt text, pattern fills, contrast warnings), WCAG mapping |
| Agent patterns | Visualization patterns and cookbook for LLM-generated charts |
| Architecture | Compilation pipeline, package boundaries, design decisions |
| Migrating to v9 | Annotation defaults, transaction editing, theme precedence, and retired APIs |
| Migrating to v8 | Breaking changes, before/after specs, and jq codemod recipes for the v8 upgrade |
| Theming tokens | Design token system, TokenValue light/dark pairs, seriesStrategy, named presets |
| Contributing | Setup, running tests, adding chart types, PR guidelines |
Packages
@opendata-ai/openchart-core Types, theme, colors, a11y, locale (no DOM)
@opendata-ai/openchart-engine Headless compiler: spec in, layout out (no DOM)
@opendata-ai/openchart-vanilla DOM rendering: SVG charts, maps, sankey, tilemaps,
HTML tables, bar lists, canvas graphs (+ ./story, ./gif)
@opendata-ai/openchart-react React wrappers with lifecycle management
@opendata-ai/openchart-vue Vue 3 wrappers with lifecycle management
@opendata-ai/openchart-svelte Svelte 5 wrappers with lifecycle management
Dependency direction: core <- engine <- vanilla <- react / vue / svelte. No lateral imports.
Claude Code skill
If you use Claude Code, the OpenChart skill gives Claude knowledge of the spec grammar, encoding rules, and design best practices so it can generate publication-quality specs from your data.
/plugin marketplace add tryopendata/skills
/plugin install openchart@openchart
/openchart
Or reference it in your Claude Code rules and prompts: Skill(openchart:openchart)
Part of the OpenData ecosystem
OpenChart is the visualization layer for OpenData, an open source platform for discovering, exploring, and visualizing public datasets. If you're looking for data to chart, that's a good place to start.
License
Apache 2.0
Related Packages
Vue 3 wrapper for ApexSankey - A JavaScript library to create Sankey diagrams
Library for creating powerful and interactive graph visualizations with ease.
Nuxt module for @memotux/vue-plot — declarative data visualization with Observab...
Version History
| Version | Released | License |
|---|---|---|
| 8.9.1 | Apache-2.0 | |
| 8.9.0 | Apache-2.0 | |
| 8.8.0 | Apache-2.0 | |
| 8.7.0 | Apache-2.0 | |
| 8.6.4 | Apache-2.0 | |
| 8.6.3 | Apache-2.0 | |
| 8.6.2 | Apache-2.0 | |
| 8.6.1 | Apache-2.0 | |
| 8.6.0 | Apache-2.0 | |
| 8.5.2 | Apache-2.0 | |
| 8.5.1 | Apache-2.0 | |
| 8.5.0 | Apache-2.0 | |
| 8.4.1 | Apache-2.0 | |
| 8.4.0 | Apache-2.0 | |
| 8.3.1 | Apache-2.0 | |
| 8.3.0 | Apache-2.0 | |
| 8.2.3 | Apache-2.0 | |
| 8.2.2 | Apache-2.0 | |
| 8.2.1 | Apache-2.0 | |
| 8.2.0 | Apache-2.0 | |
| 8.1.1 | Apache-2.0 | |
| 8.1.0 | Apache-2.0 | |
| 8.0.0 | Apache-2.0 | |
| 7.11.0 | Apache-2.0 | |
| 7.10.0 | Apache-2.0 | |
| 7.9.3 | Apache-2.0 | |
| 7.9.2 | Apache-2.0 | |
| 7.9.1 | Apache-2.0 | |
| 7.9.0 | Apache-2.0 | |
| 7.8.0 | Apache-2.0 |
Showing the latest 30 of 128. See every release on npm
Pre-releases (28)
| Version | Released | License |
|---|---|---|
| 9.0.0-rc.2 | Apache-2.0 | |
| 9.0.0-rc.1 | Apache-2.0 | |
| 8.0.0-rc.26 | Apache-2.0 | |
| 8.0.0-rc.25 | Apache-2.0 | |
| 8.0.0-rc.24 | Apache-2.0 | |
| 8.0.0-rc.23 | Apache-2.0 | |
| 8.0.0-rc.22 | Apache-2.0 | |
| 8.0.0-rc.21 | Apache-2.0 | |
| 8.0.0-rc.20 | Apache-2.0 | |
| 8.0.0-rc.19 | Apache-2.0 | |
| 8.0.0-rc.18 | Apache-2.0 | |
| 8.0.0-rc.17 | Apache-2.0 | |
| 8.0.0-rc.16 | Apache-2.0 | |
| 8.0.0-rc.15 | Apache-2.0 | |
| 8.0.0-rc.14 | Apache-2.0 | |
| 8.0.0-rc.13 | Apache-2.0 | |
| 8.0.0-rc.12 | Apache-2.0 | |
| 8.0.0-rc.11 | Apache-2.0 | |
| 8.0.0-rc.10 | Apache-2.0 | |
| 8.0.0-rc.9 | Apache-2.0 | |
| 8.0.0-rc.8 | Apache-2.0 | |
| 8.0.0-rc.7 | Apache-2.0 | |
| 8.0.0-rc.6 | Apache-2.0 | |
| 8.0.0-rc.5 | Apache-2.0 | |
| 8.0.0-rc.4 | Apache-2.0 | |
| 8.0.0-rc.3 | Apache-2.0 | |
| 8.0.0-rc.2 | Apache-2.0 | |
| 8.0.0-rc.1 | Apache-2.0 |