Skip to main content

Chart types

The seven draw layers. Each is a React component you render inside <Layers>, handed a pond series and told which column to read. They share one shape:

  • series + column — the data and the numeric column to draw. Some layers read fixed column sets instead (lower/upper, OHLC).
  • as — the style channel (a theme.<kind> role lookup). Never a per-component colour/width prop.
  • axis — the scale channel (which <YAxis id> to measure against).

Style and scale are separate on purpose. For the axis and layout mechanics see Axes and Layout; each page below links the generated typedoc for the exhaustive prop types.

LayerDrawsReach for it when
LineChartA gap-aware line through one columnA continuous series over time or a value axis
AreaChartA filled area to a baselineVolume / magnitude, or an above-below split
BandChartA filled envelope between two columnsA variance / confidence band (percentile fan)
ScatterChartPoints, with data-driven radius / colourDiscrete events; a 2-encoding cloud (vol smile)
BarChartBars — buckets, histograms, stacks, categoriesAggregated buckets, distributions, category totals
BoxPlotBox-and-whisker from pre-computed quantilesA distribution per bucket (five quantile columns)
CandlestickOHLC candlesFinancial price bars

Every layer draws identically across a time, value, or (for BarChart) category x axis — the kind follows the data, not the component. BarChart in its bins mode is the histogram; there's no separate Histogram component.

Beside the draw layers sit two standalone row listsBarList & BoxList — DOM tables (no <ChartContainer>) for the ranked-entity shape: one row per interface / split / symbol, a proportional bar or five-number distribution per row, data cells, custom sort, and a per-row expander.

View builders (for custom draw code)

Starting from a pond series, the series is the whole contract — every layer accepts it directly and shapes internally; there is no adapter step to learn. The exported from* / stacksFrom* functions (fromTimeSeries, boxFromTimeSeries, stacksFromColumns, …) expose the package's chart-ready view shapes (ChartSeries, BoxSeries, …) for one audience: consumers writing their own draw code on top of them. No shipped layer needs their output — if you find yourself calling one to feed a layer, that's an API gap; file it. Each page's Data contract section names the columns its layer reads.