Small multiples / faceting
native
Repeat a chart per category in a grid
Matrix status native. Verification runtime · strong. ChartKit option: layout.facet.
layout.facet splits one chart by a field into a rows and columns grid. wrap flows extra panels. scales shared locks one nice y domain and keeps y labels on the outer column and x labels on the bottom row. independent repeats the axes. legend shared draws one legend. A missing field warns CK3040. An unknown field warns CK3041. columns or rows outside 1 to 12 warn CK3042 and CK3043. wrap false with too many categories warns CK3049.
Source: packages/core/src/layout.ts
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "line",
"data": [
{
"quarter": "Q1",
"region": "North",
"units": 40,
"cost": 10
},
{
"quarter": "Q2",
"region": "North",
"units": 55,
"cost": 11
},
{
"quarter": "Q1",
"region": "South",
"units": 22,
"cost": 12
},
{
"quarter": "Q2",
"region": "South",
"units": 31,
"cost": 13
}
],
"encoding": {
"x": "quarter",
"y": [
"units",
"cost"
]
},
"a11y": {
"alt": "North stays above South in both quarters."
},
"size": {
"width": 640,
"height": 260
},
"layout": {
"facet": {
"field": "region",
"columns": 2,
"scales": "shared",
"legend": "shared"
}
}
}Other libraries
Option names are the paths recorded in the matrix. A grep-only cell names the identifier that matched, not a render test. Markdown copy: layout.facet.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | manual | Plugin.afterDatasetsDraw | mechanism · weak | chart.js/dist/types/index.d.ts:1051 |
| Recharts | manual | Customized | mechanism · weak | recharts/types/component/Customized.d.ts:26 |
| Apache ECharts | native | gridmultiple grids + series per grid | types · strong | echarts/types/dist/shared.d.ts:12570 |
| Highcharts | manual | SVGRenderer | mechanism · weak | highcharts/highcharts.d.ts:115777 |
| Plotly.js | native | layout.gridsubplots | types · strong | plot-schema.json#layout.layoutAttributes.grid |
| Nivo | manual | Line.layers | mechanism · weak | @nivo/line/dist/types/types.d.ts:171 |
| Victory | manual | VictoryBarProps.dataComponent | mechanism · weak | victory-core/lib/victory-util/common-props.d.ts:9 |
| visx | manual | Group | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | unknown | — | unverified · unknown | — |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: fxfacet channels | grep · weak | @observablehq/plot/src/scales.d.ts:151 |
| Vega-Lite | native | grep: facet | grep · weak | 1545: "description" |
| AG Charts | none | — | absence · absence | — |
| amCharts 5 | manual | Graphics | mechanism · weak | @amcharts/amcharts5/.internal/core/render/Graphics.d.ts:162 |
| Google Charts | unknown | — | unverified · unknown | — |
| uPlot | manual | Options.hooks | mechanism · weak | uplot/dist/uPlot.d.ts:394 |
| TradingView Lightweight Charts | manual | grep: ICustomSeriesPaneView | mechanism · weak | 1629: addCustomSeries<TData extends CustomData<HorzScaleItem>, TOptions extends CustomSeriesOptions, TPartialOptions extends SeriesPartialOptions<TOptions> = SeriesPartialOptions<TOptions>>(customPaneView |
| MUI X Charts | manual | ChartsContainer | mechanism · weak | @mui/x-charts/ChartsContainer/ChartsContainer.d.mts:34 |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: facetRect | grep · weak | @antv/g2/lib/index.d.ts:161 |