TanStack Charts Introduced with a Framework Agnostic Grammar of Graphics for TypeScript
TanStack Charts is a new, framework-agnostic visualization library for TypeScript. It allows developers to create visualizations by composing various elements instead of using fixed chart types. Currently in Alpha, it has about 160,000 weekly downloads. The library supports multiple frameworks and is designed for a variety of environments, though it is not yet stable for production use. By Daniel…
TanStack Charts, crafted by Tanner Linsley and the TanStack team, launched as a framework-independent visualization grammar for TypeScript. Currently in Alpha, the library has already amassed around 160,000 weekly downloads. Unlike traditional charting tools, TanStack Charts does not provide a predefined set of chart components. Instead, developers can construct charts by combining marks, scales, channels, transforms, and layers.
The runtime is an independent implementation, with its API closely resembling Observable Plot's marks-and-channels design. A notable aspect of the library is that the inferred types remain linked to the original data source, allowing each mark to directly read from the data shape.
TanStack Charts is adaptable, with adapters available for React, Preact, Vue, Solid, Svelte, Angular, Lit, and a vanilla DOM host. Installation is straightforward, requiring a single package: pnpm add @tanstack/charts, and the React adapter necessitates react and react-dom as peers.
React Native users are encouraged to try the experimental RN adapter provided in the docs. Tanner Linsley expressed excitement about the library, calling it "the charting library I always dreamed of." The official move to Alpha was marked by 11 releases, 188 examples, a comprehensive shadcn chart catalog, multiple axes, polar scales, and drillable sunbursts.
The library's development primarily involved AI coding agents, under Linsley's direct supervision, followed by review and acceptance. While TanStack Charts is often better suited for simpler chart creations that don't require complex, real-time data processing, it does not cater to heavy real-time workloads that require hardware-accelerated renderers.
The documentation provides a large data guide comparing the library to competitors, highlighting that TanStack Charts has a smaller bundle size, around 29 kB minified and gzipped, compared to 45 to 58 KiB for Chart.js, 83 to 92 KiB for Observable Plot, 153 to 173 KiB for Apache ECharts, and even larger figures for AG Charts. The library is officially not production-ready, and teams considering a switch are advised to review the migration guide.
TanStack Charts is part of the family of open-source, headless, type-safe libraries created by Tanner Linsley, including Query, Table, Router, Form, and the Start framework, and is released under the MIT license.
Written by urgent.news from InfoQ's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.