Chart
Chart container, tooltip, indicator, and legend recipes wired to semantic chart1–chart5 oklch tokens.
Desktop Mobile
Mar 2026
Desktop92k
Mobile64k
Usage
import {
chartContainer,
chartLegend,
chartLegendItem,
chartLegendSwatch,
chartTooltip,
chartTooltipIndicator,
chartTooltipItem,
chartTooltipLabel,
} from "coatx/chart";
import { colors } from "coatx/tokens.stylex";
Note:
colors.chart1throughcolors.chart5adapt automatically betweentheme("light")andtheme("dark"), and can be overridden per container viatheme(mode, { chart1: "..." }).
Exports (coatx/chart)
| Export | Description |
|---|---|
chartContainer(options?) |
Responsive 16:9 chart wrapper with tabular numerals |
chartTooltip(options?) |
Elevated tooltip surface for hovered data points |
chartTooltipLabel(options?) |
Tooltip heading row |
chartTooltipItem(options?) |
Series label & value row |
chartTooltipIndicator(options?) |
Series marker (indicator: "dot", "line", "dashed"; series: 1–5) |
chartLegend(options?) |
Wrapping horizontal legend bar |
chartLegendItem(options?) |
Legend entry combining swatch and label |
chartLegendSwatch(options?) |
Series color swatch (series: 1–5) |
chartStyles |
Compiled StyleX style map |