Features · layout

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.

North stays above South in both quarters.North stays above South in both quarters.NorthNorth. North stays above South in both quarters.North102030405060Q1Q2unitsSouthSouth. North stays above South in both quarters.SouthQ1Q2unitscost
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsmanualPlugin.afterDatasetsDrawmechanism · weakchart.js/dist/types/index.d.ts:1051
RechartsmanualCustomizedmechanism · weakrecharts/types/component/Customized.d.ts:26
Apache EChartsnativegridmultiple grids + series per gridtypes · strongecharts/types/dist/shared.d.ts:12570
HighchartsmanualSVGRenderermechanism · weakhighcharts/highcharts.d.ts:115777
Plotly.jsnativelayout.gridsubplotstypes · strongplot-schema.json#layout.layoutAttributes.grid
NivomanualLine.layersmechanism · weak@nivo/line/dist/types/types.d.ts:171
VictorymanualVictoryBarProps.dataComponentmechanism · weakvictory-core/lib/victory-util/common-props.d.ts:9
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsunknown—unverified · unknown—
Tremor (npm)none—absence · absence—
Observable Plotnativegrep: fxfacet channelsgrep · weak@observablehq/plot/src/scales.d.ts:151
Vega-Litenativegrep: facetgrep · weak1545: "description"
AG Chartsnone—absence · absence—
amCharts 5manualGraphicsmechanism · weak@amcharts/amcharts5/.internal/core/render/Graphics.d.ts:162
Google Chartsunknown—unverified · unknown—
uPlotmanualOptions.hooksmechanism · weakuplot/dist/uPlot.d.ts:394
TradingView Lightweight Chartsmanualgrep: ICustomSeriesPaneViewmechanism · weak1629: addCustomSeries<TData extends CustomData<HorzScaleItem>, TOptions extends CustomSeriesOptions, TPartialOptions extends SeriesPartialOptions<TOptions> = SeriesPartialOptions<TOptions>>(customPaneView
MUI X ChartsmanualChartsContainermechanism · weak@mui/x-charts/ChartsContainer/ChartsContainer.d.mts:34
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: facetRectgrep · weak@antv/g2/lib/index.d.ts:161