Library / SDK
TanStack/charts avatar
TanStack/charts

TanStack Charts splits scale ownership by layer and calls its own releases Alpha

A tiny TypeScript visualization grammar for responsive, accessible, server-rendered charts—powered by granular D3 primitives.

871 stars57 forksTypeScriptMIT

At a glance

What is it?
A TypeScript chart grammar where three layers divide the work: compact scales for common mappings, granular D3 modules for the specialised algorithms, and the runtime for marks, layout and rendering. One definition renders through eleven hosts, and the published 0.18.0 is already behind the main branch the README follows.
Who is it for?
TanStack Charts is a reasonable fit for an application that already has an unusual chart to draw and a typed data model it does not want to reshape, since the grammar is built to grow past line and bar without a second API. It is a poor fit if you need a stable 0.x contract, because the project states that Alpha releases may carry breaking changes between minor versions and asks you to pin an exact version.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • TanStack/charts871 ★ · +127
Star history
Repository2026-09-172026-11-15
TanStack/charts744871

127 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Three releases in two days, and main is ahead of all of them

The status block at the top of the page settles the versioning question first. The README follows unreleased main, described as the official Alpha line, while the latest published release is 0.18.0 and its documentation lives on a separate release-source branch. Alpha releases use regular 0.x versions and may contain breaking changes between minor releases, and the page asks you to pin an exact version for production use and to read the Alpha stability policy before upgrading. The tag history matches that description: v0.16.2 on 2026-09-09, v0.17.0 later the same day, and v0.18.0 on 2026-09-10. Two minor bumps inside 36 hours is what a breaking-change policy looks like in practice, so a caret range is not a dependency declaration here.

One definition, eleven hosts, no adapter generics

Chart definitions are framework-independent, and the same revenueChart definition can render through React, Preact, Vue, Solid, Svelte, Angular, Lit, Alpine, Octane, a vanilla DOM host, static SVG, or the optional Canvas renderer. That is twelve targets from one object, and the mechanism is that the definition drives host prop and callback inference, so normal authoring does not require adapter generics. What crosses the boundary is a renderer-neutral keyed scene: marks consume the original rows, channels describe their visual encodings, compact scale factories infer domains from those channels, and the runtime assigns responsive pixel ranges before handing the compiled scene to whichever host you selected. A configured scale instance keeps its authored domain rather than having one inferred over it. On the data side the rule is that marks consume arrays, objects, tuples and iterables directly, and different layers are allowed to use different datum types, so no reshaping step is required between your data and a mark.

Compact scales cover three mappings and hand the rest to D3

The core model is a table of who owns what, and it is deliberately split. TanStack compact scales cover common numeric linear mappings, categorical band and point mappings, and categorical ordinal mappings. Granular D3 modules take temporal, nonlinear, piecewise, spatial, layout and other specialised algorithms. TanStack Charts itself owns marks, channels, responsive ranges, guide layout, scene compilation, rendering and lifecycle. The stated payoff is that specialised algorithms stay visible and replaceable while applications still get a consistent runtime. Two absences are named as design decisions: there is no global registry, no library-owned dataframe, and no chart-type configuration model. When a compact scale is not enough, the instruction is to replace only that one scale with its direct d3-scale counterpart and leave the rest of the grammar alone.

Canvas removes per-mark DOM cost and nothing else

The Canvas story is stated with its limits attached. When SVG element count becomes the bottleneck, the instruction is to switch the adapter import and keep the definition and host callbacks as they are. Canvas stays outside the default bundles, and React and Octane also expose a renderer-neutral /core entry for applications that own the surface themselves. The page is explicit about what the switch does not buy: Canvas removes per-mark DOM cost, not scene memory, and not the cost of dense nearest-point work. So a large interactive chart still needs a measured spatial index or a bounded representation, which means choosing Canvas and choosing an interaction strategy are two separate decisions. The application runtime in general is listed as responsive layout, automatic guide margins, themes, interaction, animation, accessibility, SVG SSR, opt-in Canvas painting, hydration and export.

Subpaths are the packaging contract, and the old names stay published

Marks, transforms, layouts, renderers and chart-owned interactions each have an independent subpath, and optional D3-backed capabilities and direct D3 imports stay granular and tree-shakeable. The install surface is deliberately small:

ts
import { scaleLinear } from '@tanstack/charts/scales/linear'
import { Chart } from '@tanstack/charts/react'
import { Chart as CanvasChart } from '@tanstack/charts/react/canvas'

Underneath, the source stays split into focused workspace packages for development and verification, and those internal boundaries are assembled into the published @tanstack/charts package. Existing package names remain published for compatibility even though new applications do not need them, which means the old entry points are still there, taking up resolution work for anyone who follows older examples. Two pieces of earlier work also stay in the tree: an earlier host experiment under @plot-poc/* kept for migration evidence and benchmark comparison, and a private @tanstack/charts-d3 package preserving a superseded backend experiment.

The root package is still named after a proof of concept

The repository root is named tanstack-charts-poc and marked private, which is the package.json you get, while the package applications install is @tanstack/charts. The toolchain around it is pinned: pnpm 11.15.1 as the package manager, Node 22 or newer, an Nx workspace behind nx.json, and TypeScript through tsconfig.json. The scripts read like an instrument panel: validate runs the workspace CI target and then git diff --check, benchmark calls scripts/compare-chart-libraries.mjs with separate perf, size, stress and baseline-update variants, stress takes full, quick and standard profiles, and there are separate checks for adapters, bundles and the Canvas renderer. Browser work needs playwright install --only-shell chromium. At the top level, competitor-profiles/, _artifacts/, media/ and eight vitest configs sit next to nine planning documents including API-FRICTION.md, PORTABLE-CHART-SPEC.md and REACT-NATIVE-HOST-POC.md, plus llms.txt. The example tree carries charts-expo/, charts-octane/, charts-react-native/, charts-react/, conformance/, octane/, react/ and sandbox/, which is the practical list of surfaces you can check a claim against.

Definition identity is the update boundary

The last mechanism worth naming is when a chart re-renders. For live application state the instruction is to memoize the complete defineChart(...) result with the framework's own memoization primitive, because definition identity is the application update boundary. The callbacks inside a definition are not frozen by that: responsive definition callbacks still receive the current chart size and theme, so memoizing the definition does not freeze the layout. The definition is also what drives host prop and callback inference, which is why adapter generics are not part of ordinary authoring. The project is equally direct about how it was built: the author designed it and directed its architecture, API, tradeoffs and final decisions, while almost all of the implementation was produced with AI coding agents under direct supervision and then reviewed before being accepted. Conceptual lineage is credited separately in ACKNOWLEDGEMENTS.md, and the project describes itself as an independent implementation.

Editorial conclusion

TanStack Charts is a reasonable fit for an application that already has an unusual chart to draw and a typed data model it does not want to reshape, since the grammar is built to grow past line and bar without a second API. It is a poor fit if you need a stable 0.x contract, because the project states that Alpha releases may carry breaking changes between minor versions and asks you to pin an exact version. Before adopting it, read the Alpha stability policy, check whether your scale of choice is a compact scale or a direct d3-scale import, and measure your own bundle through the size scripts rather than trusting the subpath list. On a live application, memoize the whole defineChart result or every state change becomes a redraw.

Frequently asked questions

Is TanStack Charts stable enough to pin a caret range?

No. The status block says the README follows unreleased main as the Alpha line, that Alpha releases use regular 0.x versions, and that they may contain breaking changes between minor releases. It asks you to pin an exact version for production use and read the Alpha stability policy before upgrading.

Which frameworks can render a TanStack Charts definition?

One definition renders through React, Preact, Vue, Solid, Svelte, Angular, Lit, Alpine, Octane, a vanilla DOM host, static SVG, or the optional Canvas renderer. The definition drives host prop and callback inference, so ordinary authoring needs no adapter generics.

When should I switch TanStack Charts to the Canvas renderer?

When SVG element count becomes the bottleneck, by swapping the adapter import and keeping the definition. Canvas removes per-mark DOM cost only: it does not remove scene memory or the cost of dense nearest-point work, so large interactive charts still need a measured spatial index.

Does TanStack Charts bundle D3?

It splits ownership instead. Compact scales cover numeric linear, categorical band and point, and categorical ordinal mappings, while temporal, nonlinear, piecewise, spatial and layout algorithms come from granular D3 modules. When a compact scale lacks the semantics you need, replace that scale with its direct d3-scale counterpart.

How do I stop a live TanStack Charts chart redrawing on every state change?

Memoize the complete defineChart(...) result with the framework's native memoization primitive, since definition identity is the application update boundary. Responsive callbacks inside the definition still receive the current chart size and theme.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. TanStack/charts on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tanstack-charts.svg)](https://hysenlabs.com/projects/tanstack-charts)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/tanstack-charts.svg)](https://hysenlabs.com/projects/tanstack-charts)

Was this useful?