TanStack charts

Runway uses TanStack Charts as its only plotting engine. Import Chart, ChartCard and defineChart from @kahwee/runway-ui/react; marks, scales and transforms come from the pinned @tanstack/charts peer. Runway supplies theme, figure and exact-table styling, not a second geometry engine.

Open the chart lab · Storybook playground · Recorded-history recipe

React usage

import { Chart, ChartCard, defineChart } from "@kahwee/runway-ui/react";
import { barY } from "@tanstack/charts/bar";
import { scaleLinear } from "@tanstack/charts/scales/linear";
import { scaleBand } from "@tanstack/charts/scales/band";
import { useMemo } from "react";

const definition = useMemo(() => defineChart({
  marks: [barY(observations, { x: "day", y: "value" })],
  scales: { x: { scale: scaleBand }, y: { scale: scaleLinear, axis: { label: "Units per day" } } },
}), [observations]);

<ChartCard title="Recorded output" caption="Units per day · exact values follow">
  <Chart definition={definition} height={200} ariaLabel="Output by recorded day" />
  {/* Render an ordinary exact-data table from the same observations. */}
</ChartCard>;

The shared example renderer in examples/charts/components.tsx demonstrates columns, stacked/signed/horizontal bars, lines, areas and small multiples. It is example code, not an additional public component API. Standalone example pages bundle React/TanStack locally at publication time; no CDN or import map is required. The adjacent license file retains third-party notices.

Honest data and accessibility

Migration from CSS plots

The CSS-only column, stacked/diverging bar, six-point area, sparkline and legacy history geometry implementations are removed from current source. The original rw-column-*, rw-stack-mark, rw-diverging-*, rw-area, rw-spark and rw-chart__plot marks no longer draw anything. Move their original observations to TanStack marks and retain labels/units/notes in the exact table.

charts.css remains a stable styling entry for figure/table layout only; history.css retains history-surface and screen-reader utilities. Importing CSS alone does not create a chart. Native progress and meters remain bounded-state controls, not alternative time-series renderers. See the React guide.