# OpenChart > Charts, tables and maps from a JSON spec. ## Guides ### Get started - [Introduction](https://openchart.steamfield.io/docs/get-started/introduction.md): What OpenChart makes, shown as published graphics, and how these docs are organized. - [Getting started](https://openchart.steamfield.io/docs/get-started/getting-started.md): Build a line chart, then add chrome, annotations, a theme and a data table. - [Frameworks](https://openchart.steamfield.io/docs/get-started/frameworks.md): Install and use OpenChart in React, Vue, Svelte or plain JavaScript: the spec as state, updates, dark mode and themes. - [Static rendering](https://openchart.steamfield.io/docs/get-started/static-rendering.md): Render charts to SVG at build time or on the server with renderStaticSVG, for CMS pages, reports and readers without JavaScript. - [Bundle size](https://openchart.steamfield.io/docs/get-started/bundle-size.md): Import one OpenChart visualization and ship only that one: what each import costs, which imports pull in everything, and how to check your own bundle. ### Working with agents - [Generating specs](https://openchart.steamfield.io/docs/agents/generating-specs.md): Have a language model write specs: the published JSON Schema, tool use, strict modes and the validate-and-repair loop. - [Agent patterns](https://openchart.steamfield.io/docs/agents/agent-patterns.md): Spec patterns by storytelling intent, each with its data shape, a complete spec and annotations. ### Recipes - [Dashboards](https://openchart.steamfield.io/docs/recipes/dashboards.md): Small charts in product UI: tile sizing, sparkline KPI cards, trimmed chrome, bar lists and tables in a grid. - [Ranking and change](https://openchart.steamfield.io/docs/recipes/ranking-and-change.md): Slope, bump and range charts for who moved and by how much, as copyable recipes. ### Upgrading - [Migrating to v9](https://openchart.steamfield.io/docs/upgrading/migrating-v9.md): Upgrade from 8.9 to 9: annotation defaults, theme composition, removed APIs and spec migration. - [Migrating to v8](https://openchart.steamfield.io/docs/upgrading/migrating-v8.md): Upgrade from v7 to v8: spec and import changes, and the renderer move. ## Visualizations ### Comparison - [Bar](https://openchart.steamfield.io/docs/comparison/bar.md): Compare one value across named categories with horizontal bars, then sort, group, stack, label and highlight them. - [Column](https://openchart.steamfield.io/docs/comparison/column.md): Compare one value across ordered categories such as months or years with vertical columns, then annotate, color by sign and label them. - [Grouped and stacked bars](https://openchart.steamfield.io/docs/comparison/grouped-stacked.md): Split each bar or column into series, placed side by side to compare series or stacked end to end to read totals and parts. - [Lollipop](https://openchart.steamfield.io/docs/comparison/lollipop.md): Compare values across categories with a dot on a thin stem, then plot negatives or show two values per category. - [Bar list](https://openchart.steamfield.io/docs/comparison/bar-list.md): Show a ranked list of labelled values as compact rows with inline bars, grouped, limited and sized to fit a card or a dense layout. - [Range (dumbbell)](https://openchart.steamfield.io/docs/comparison/range.md): Show the span between two values per category as a dumbbell, an arrow or a floating bar, for change between two periods or a low to high range. - [Population pyramid](https://openchart.steamfield.io/docs/comparison/pyramid.md): Draw two groups back to back with mirrored bars, such as men and women by age, then play the pyramid through the years. ### Change over time - [Line](https://openchart.steamfield.io/docs/change-over-time/line.md): Trace one or more series across a continuous axis, then annotate, label the line ends, focus a series, change the curve, format dates and switch to a log scale. - [Area](https://openchart.steamfield.io/docs/change-over-time/area.md): Fill the space under a line to show how a quantity builds over time, then add reference lines and compare overlapping series from a shared zero baseline. - [Stacked area](https://openchart.steamfield.io/docs/change-over-time/stacked-area.md): Show how a total divides into parts over time with stacked areas, then normalize each period to 100% or center the stack as a streamgraph. - [Slope and bump](https://openchart.steamfield.io/docs/change-over-time/slope-bump.md): Compare two moments with a slope chart or follow rank across many periods with a bump chart. Both are line charts with a few extra spec fields. - [Race](https://openchart.steamfield.io/docs/change-over-time/race.md): Play a ranking over time as bars, lines or a table, and let readers pause on any period. - [Playback](https://openchart.steamfield.io/docs/change-over-time/playback.md): Time a chart that plays through periods, choose when it starts, and drive it from code with play, pause, seek and period events. - [Sparkline](https://openchart.steamfield.io/docs/change-over-time/sparkline.md): Shrink a line or area to a word-sized trend with display "sparkline", which strips the title, axes, legend and watermark so it fits beside a number. - [Calendar](https://openchart.steamfield.io/docs/change-over-time/calendar.md): Lay a daily value out as a grid of weeks and weekdays, one colored cell per day, to read seasonality and streaks across a year or several. ### Part to whole - [Pie and donut](https://openchart.steamfield.io/docs/part-to-whole/pie-donut.md): Show a handful of shares of one whole with a pie or donut, then add a center label, group small slices, label with leader lines or sweep a half circle. - [Stacked 100%](https://openchart.steamfield.io/docs/part-to-whole/stacked-100.md): Compare how several wholes divide into parts by scaling every bar or column to the same length with stack "normalize", for categories or periods. - [Waffle](https://openchart.steamfield.io/docs/part-to-whole/waffle.md): Show shares of a whole as a grid of unit squares the reader can count, then highlight one category, resize the grid and bucket small categories into Other. - [Parliament](https://openchart.steamfield.io/docs/part-to-whole/parliament.md): Draw legislative seats as dots in a hemicycle grouped by party, then add a multi-party chamber, hide the majority line or move it to a custom threshold. ### Distribution - [Histogram](https://openchart.steamfield.io/docs/distribution/histogram.md): Bin one numeric field and count each bin to show where values cluster, then change the bin count, overlap groups and compare them as shares. - [Density](https://openchart.steamfield.io/docs/distribution/density.md): Smooth one numeric field into a density curve to compare the shape of groups, then change the bandwidth or switch to a cumulative curve. - [Beeswarm](https://openchart.steamfield.io/docs/distribution/beeswarm.md): Draw every observation as a dot, dodged so none overlap, then split into lanes by group, turn the swarm vertical and size dots by a second field. - [Tick strip](https://openchart.steamfield.io/docs/distribution/tick-strip.md): Draw one short tick per observation along a shared axis to show the spread of values in each group, then color the strips and add a reference line. - [Error bars](https://openchart.steamfield.io/docs/distribution/error-bars.md): Draw an interval between two supplied bounds, vertical or horizontal, with optional end caps, and layer a point to mark an estimate inside it. ### Correlation - [Scatter](https://openchart.steamfield.io/docs/correlation/scatter.md): Plot two numeric fields against each other to find correlation, clusters and outliers, then add color, direct labels, a reference line and a log axis. - [Bubble](https://openchart.steamfield.io/docs/correlation/bubble.md): Add a third number to a scatter as dot size, then color the bubbles by group and annotate the ones that matter with callouts and a reference line. - [Bubble playback](https://openchart.steamfield.io/docs/correlation/bubble-playback.md): Play a bubble chart year by year, Gapminder style, with fixed axes, named countries, trails and a large period label behind the bubbles. - [Heatmap](https://openchart.steamfield.io/docs/correlation/heatmap.md): Color a grid of two categories by a number to read patterns across rows and columns, then change the color scheme, pin the color domain and order the rows. - [Trendlines](https://openchart.steamfield.io/docs/correlation/trendlines.md): A scatter fits one least-squares line through its points by default. Turn it off, restyle it, draw it over a dense cloud and see how it treats color groups. ### Flow and networks - [Sankey](https://openchart.steamfield.io/docs/flow/sankey.md): Show how a quantity moves from sources through stages to destinations, with ribbon widths in proportion to the flow. - [Graph](https://openchart.steamfield.io/docs/flow/graph.md): Draw a network of nodes and edges with a force layout, then encode size, color and labels and mark a seed node. ### Maps - [Choropleth](https://openchart.steamfield.io/docs/maps/choropleth.md): Color regions on a map by a value, from US states to world countries, with classed scales, projections and no-data fills. - [Symbol map](https://openchart.steamfield.io/docs/maps/symbol-map.md): Place sized and colored circles on a map by longitude and latitude, alone on a basemap or over a choropleth. - [Tile map](https://openchart.steamfield.io/docs/maps/tile-map.md): Give every US state one equal tile in a grid that keeps the country's rough shape, colored by a number or a category. - [Geographic labels](https://openchart.steamfield.io/docs/maps/geographic-labels.md): Name the regions and points on a map from data, and anchor authored callouts to features that hold as readers zoom. - [Time-lapse map](https://openchart.steamfield.io/docs/maps/time-lapse.md): Play a choropleth, tile map or symbol layer through periods, with one color scale and legend held for the whole run. ### Tables - [Data table](https://openchart.steamfield.io/docs/tables/data-table.md): Show rows and columns as an interactive table with formats, sorting, search, paging, row density and a total row, from a declarative spec. - [Column types](https://openchart.steamfield.io/docs/tables/column-types.md): Turn table columns into heatmaps, inline bars, sparklines, delta chips, images and category chips with one config field per column. - [Row inspection](https://openchart.steamfield.io/docs/tables/row-inspection.md): Read across one row at a time, with the rowHover option on horizontal bar charts and search, sort, totals and row clicks on tables. ### Composition - [Layers](https://openchart.steamfield.io/docs/composition/layers.md): Draw several marks on one plot with a layer array, such as bars with a reference rule, labelled points, or two series on independent axes. - [Facets and small multiples](https://openchart.steamfield.io/docs/composition/facets.md): Repeat one chart as a grid of panels, one per category, with shared or independent scales and wrapped, row or column layouts. - [Dashboard tiles](https://openchart.steamfield.io/docs/composition/dashboard-tiles.md): Compact chart forms for dense layouts, from sparklines and short charts to metric rows, bar lists and condensed tables, as single specs. ## Building blocks ### The spec - [Anatomy of a spec](https://openchart.steamfield.io/docs/the-spec/anatomy.md): One published chart taken apart: data, mark, encoding, chrome and annotations, and what each block adds. - [Encoding channels](https://openchart.steamfield.io/docs/the-spec/encoding.md): Map fields to x, y, color and size, and see the same data read differently as the channels change. - [Field types and scales](https://openchart.steamfield.io/docs/the-spec/scales.md): Nominal, ordinal, quantitative and temporal fields, and the scale settings for domain, zero, log and color ramps. - [Axes](https://openchart.steamfield.io/docs/the-spec/axes.md): Tick formats, tick counts, gridlines, axis titles and long labels, set on the encoding channel. - [Transforms](https://openchart.steamfield.io/docs/the-spec/transforms.md): Filter, aggregate, bin, fold, calculate and window data inside the spec, so published numbers trace back to source rows. ### Framing - [Title, subtitle and source](https://openchart.steamfield.io/docs/framing/chrome.md): The text around a chart: a headline that states the finding, a subtitle with measure and unit, the source and byline. - [Annotations](https://openchart.steamfield.io/docs/framing/annotations.md): Text callouts with connectors, reference lines and shaded ranges, placed in data coordinates to point at the story. - [Labels and legends](https://openchart.steamfield.io/docs/framing/labels-legends.md): Value labels, their density and format, and when a legend earns its place over labelling marks directly. - [Endpoint labels](https://openchart.steamfield.io/docs/framing/endpoint-labels.md): Name each line at its end with its series and last value, so readers never match colors to a legend. ### Style - [Theming and tokens](https://openchart.steamfield.io/docs/style/theming.md): ThemeConfig colors, fonts, spacing and rules for every chart, and the CSS tokens a page can set instead. - [Presets](https://openchart.steamfield.io/docs/style/presets.md): Four house styles, essay, wire, broadsheet and terminal, applied to the same chart with one theme field. - [Dark mode](https://openchart.steamfield.io/docs/style/dark-mode.md): How charts switch to dark: the darkMode setting, light and dark color pairs, and preset dark palettes. - [Color palettes](https://openchart.steamfield.io/docs/style/color.md): Categorical, sequential and diverging color, highlighting one series, and colors that survive print and color blindness. ### Behavior - [Motion](https://openchart.steamfield.io/docs/behavior/motion.md): Entrance and data-update transitions, the fluid and subtle presets, turning motion off, and what reduced motion does. - [Responsive](https://openchart.steamfield.io/docs/behavior/responsive.md): How a chart re-lays out from phone to desktop: the compact, medium and full breakpoints and the responsive settings. - [Interaction and events](https://openchart.steamfield.io/docs/behavior/interaction.md): Tooltips, crosshairs, legend toggles and selection, and the events a chart emits as a reader uses it. - [Edit mode](https://openchart.steamfield.io/docs/behavior/edit-mode.md): Let a reader drag annotations and edit text in place, and apply each edit transaction to the spec. - [Scrollytelling](https://openchart.steamfield.io/docs/behavior/scrollytelling.md): Step a chart through states as the reader scrolls with createChartStory, each step a spec change. - [You draw it](https://openchart.steamfield.io/docs/behavior/you-draw-it.md): Ask readers to draw their guess for the hidden part of a line, then reveal the real data. ### Output - [Accessibility](https://openchart.steamfield.io/docs/output/accessibility.md): What every chart does for screen readers and keyboards, the options you add, and the WCAG 2.1 mapping. - [Export](https://openchart.steamfield.io/docs/output/export.md): Download a chart as SVG, PNG or CSV in the browser, and where static rendering takes over. - [Canvas mode](https://openchart.steamfield.io/docs/output/canvas.md): Draw thousands of points on a canvas layer while axes and text stay SVG, and when the library switches by itself. ## Reference ### Spec - [Spec reference](https://openchart.steamfield.io/docs/spec/overview.md): The VizSpec union, the spec builder functions, and a one-line index of every reference page. - [ChartSpec](https://openchart.steamfield.io/docs/spec/chart-spec.md): Every top-level ChartSpec field and the mark properties, plus the A11yConfig and FrameConfig objects. - [LayerSpec](https://openchart.steamfield.io/docs/spec/layer-spec.md): LayerSpec fields for overlaying several marks on shared scales, and what each layer inherits. - [Encoding](https://openchart.steamfield.io/docs/spec/encoding.md): Encoding channels, field types, aggregates, axis and scale settings, and faceting into small multiples. - [Marks](https://openchart.steamfield.io/docs/spec/marks.md): The channels each mark type takes, complete spec examples for common charts, and canvas mark mode. - [Chrome, labels and legends](https://openchart.steamfield.io/docs/spec/chrome.md): Title, subtitle, source, byline and footer fields, plus value labels, endpoint labels and the legend. - [Transforms](https://openchart.steamfield.io/docs/spec/transforms.md): The filter, bin, calculate, timeUnit, aggregate, joinaggregate, fold, window and density transforms. - [Annotations](https://openchart.steamfield.io/docs/spec/annotations.md): Text, range and reference line annotations, with their position, connector and style fields. - [Animation](https://openchart.steamfield.io/docs/spec/animation.md): Animation presets, entrance and update phase settings, and data-update transitions. - [Theme](https://openchart.steamfield.io/docs/spec/theme.md): ThemeConfig fields for colors, fonts, spacing and chrome, and the DarkMode setting. - [TableSpec](https://openchart.steamfield.io/docs/spec/table-spec.md): TableSpec and ColumnConfig fields, the column visual types, and a complete data table example. - [GraphSpec](https://openchart.steamfield.io/docs/spec/graph-spec.md): GraphSpec fields for network charts, plus the Graph component, its props and its interaction model. - [SankeySpec](https://openchart.steamfield.io/docs/spec/sankey-spec.md): SankeySpec fields for flow diagrams: encoding, node and link settings, and an example. - [TileMapSpec](https://openchart.steamfield.io/docs/spec/tilemap-spec.md): TileMapSpec fields for US state tile grids: encoding, behavior and an example. - [GeoMapSpec](https://openchart.steamfield.io/docs/spec/geomap-spec.md): GeoMapSpec fields for choropleth and symbol maps: geography, encoding, point layers, focus and zoom. - [BarListSpec](https://openchart.steamfield.io/docs/spec/barlist-spec.md): BarListSpec fields for ranked bar lists: encoding, groups, value domains and reference lines. - [Authoring and reader APIs](https://openchart.steamfield.io/docs/spec/authoring.md): Library interfaces for authoring and reader apps: numeric observations, interaction contracts and callout limits. ### API - [Vanilla API](https://openchart.steamfield.io/docs/api/vanilla.md): The create* mount functions, MountOptions, the ChartInstance methods, the chart and table lifecycle, and the render-state attributes. - [React](https://openchart.steamfield.io/docs/api/react.md): The React components, their props and handles, the hooks, and how the components behave under server rendering. - [Vue](https://openchart.steamfield.io/docs/api/vue.md): The Vue 3 components, their props, events and exposed methods, the composables, and how the components behave under server rendering. - [Svelte](https://openchart.steamfield.io/docs/api/svelte.md): The Svelte 5 components, their callback props and exported methods, the composables, and how the components behave under server rendering. - [Events](https://openchart.steamfield.io/docs/api/events.md): Chart and table event handlers with their payloads and framework spellings, interaction modes, edit persistence and common patterns. - [Export API](https://openchart.steamfield.io/docs/api/export.md): Export charts as SVG, PNG, JPG, CSV or an animated GIF, from a chart instance, a standalone function or a framework component. - [Table state](https://openchart.steamfield.io/docs/api/table-state.md): Controlled and uncontrolled tables: sort, search and page state, and the table state hooks. ### Tokens - [Theming tokens](https://openchart.steamfield.io/docs/tokens/theming-tokens.md): ThemeConfig fields, named presets and the CSS custom properties a page can set to restyle charts and tables without changing a spec. - [Design system](https://openchart.steamfield.io/docs/tokens/design-system.md): The default palette, type scale, spacing, mark defaults, interaction language, motion timings and presets. ### JSON Schema and llms.txt - [JSON Schema and llms.txt](https://openchart.steamfield.io/docs/machine-readable/json-schema.md): The published JSON Schema, runtime validation with validateSpec, the llms.txt and Markdown exports, and the OpenChart skill for coding agents.