TanStack Charts is a tiny TypeScript visualization grammar that combines D3's power with a chart library's ergonomics for responsive, accessible, and server-rendered application charts, although it is currently in a private early proof stage and not production-ready.

Stars

41

7-day growth

No data

Forks

1

Open issues

0

License

MIT

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It offers a novel architecture that keeps D3 visible and replaceable at the algorithm level while providing a consistent application runtime with tree-shakeable imports, enabling custom visualizations without replacing the data model.

Who it is for

  • React developers who need charting with D3-level flexibility
  • Teams building product-specific visualizations that go beyond standard chart types
  • Developers who want to leverage D3 primitives without writing full D3 boilerplate
  • Engineers evaluating server-rendered or accessible charting solutions

Use cases

  • Building responsive line, bar, area, and scatter charts with native D3 scales
  • Creating custom marks using the scene protocol for unique visualizations
  • Server-side rendering SVG charts with hydration for fast initial loads
  • Integrating with existing D3 workflows while gaining lifecycle management and accessibility features

Strengths

  • Tree-shakeable entry points allow importing only what you need, reducing bundle size
  • Framework-independent chart definitions work with React, Octane, vanilla DOM, and static SVG
  • Uses native D3 scales, transforms, and layouts instead of a parallel math API
  • Includes built-in runtime features: responsive layout, themes, interaction, animation, accessibility, and SVG SSR

Considerations

  • Currently in version 0.0.0 and not published to npm, so not ready for production use
  • Requires familiarity with D3 scales and concepts to fully leverage the library
  • Documentation and ecosystem are still minimal; community adoption is nascent

README quick start

TanStack Charts

D3's power. A chart library's ergonomics.

A tiny TypeScript visualization grammar for responsive, accessible, server-rendered application charts.

Quick look · Documentation · React example · Conformance catalog · Roadmap

[!IMPORTANT] TanStack Charts is currently a private 0.0.0 product proof. The packages are not published or ready for production use yet.

Most chart libraries are easy until the chart stops being standard. TanStack Charts gives you one typed grammar that can grow from a familiar line or bar chart into a product-specific visualization without replacing your data model or dropping down to a separate API.

  • Keep your data as it is. Marks consume arrays, objects, tuples, and iterables directly. Different layers can use different datum types.
  • Bring native D3 primitives. Use D3 scales, curves, transforms, and layout output instead of relearning a parallel math API.
  • Build from common to custom. Layer built-in marks or implement a custom mark against the same public scene protocol.
  • Get the application runtime too. Responsive layout, automatic guide margins, themes, interaction, animation, accessibility, SVG SSR, hydration, and export are part of the system.
  • Pay for what you import. Marks, renderers, interactions, and specialized D3 capabilities have independent, tree-shakeable entry points.

Quick look

import { max } from 'd3-array'
import { scaleBand, scaleLinear } from 'd3-scale'
import { barY, defineChart } from '@tanstack/charts'
import { Chart } from '@tanstack/react-charts'

const revenue = [
  { month: 'Jan', value: 42 },
  { month: 'Feb', value: 58 },
  { month: 'Mar', value: 76 },
  { month: 'Apr', value: 64 },
]

const revenueChart = defineChart({
  marks: [
    barY(revenue, {
      x: 'month',
      y: 'value',
    }),
  ],
  x: {
    scale: scaleBand()
      .domain(revenue.map((row) => row.month))
      .padding(0.2),
  },
  y: {
    scale: scaleLinear()
      .domain([0, max(revenue, (row) => row.value) ?? 0])
      .nice(),
    label: 'Revenue',
    grid: true,
  },
})

export function RevenueChart() {
  return (
    
  )
}

Marks consume the original rows, channels describe their visual encodings, and configured D3 scales own the domain and mapping. TanStack copies those scales, assigns their responsive pixel ranges, compiles a

Description

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

Related repositories

Similar projects matched by category, topics, and programming language.

TanStack
Featured
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web DevelopmentFrontend Frameworks
14,861
react
Featured
react GitHub avatar

react

React is a JavaScript library for building user interfaces with declarative, component-based, and cross-platform design.

Web DevelopmentFrontend Frameworks
246,741
NUber-dev
Featured
NUber-dev GitHub avatar

YTubic

YTubic is a fast, responsive, open-source YouTube Music desktop client for Windows, Linux, and macOS that uses direct InnerTube API communication and aggressive caching to provide instant navigation and playback.

Web DevelopmentFrontend Frameworks
226