Responsive rules / breakpoints
native
Different options at different container sizes
Matrix status native. Verification runtime · strong. ChartKit option: layout.breakpoints.
layout.breakpoints is a list of rules. The first rule whose maxWidth or minWidth matches size.width, or the container width when width is auto, overrides legend, direction, facet columns, or concat direction. A narrow rule can set columns to 2 so the panels stay readable. A non-positive maxWidth warns CK3046. columns without a facet field warns CK3047.
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",
"units": 40,
"cost": 12
},
{
"quarter": "Q2",
"units": 55,
"cost": 15
}
],
"encoding": {
"x": "quarter",
"y": [
"units",
"cost"
]
},
"a11y": {
"alt": "The legend hides below 480px."
},
"size": {
"width": 320,
"height": 220
},
"layout": {
"breakpoints": [
{
"maxWidth": 480,
"legend": false
}
]
}
}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.breakpoints.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: onResizeonResize callback only | grep · weak | chart.js/dist/types/index.d.ts:1677 |
| Recharts | none | — | absence · absence | — |
| Apache ECharts | native | grep: mediabaseOption + media queries | grep · weak | echarts/types/src/model/OptionManager.d.ts:11 |
| Highcharts | native | responsive.rules | types · strong | highcharts/highcharts.d.ts:98595 |
| Plotly.js | none | — | absence · absence | — |
| Nivo | unknown | — | conflict · unknown | — |
| Victory | none | — | absence · absence | — |
| visx | none | — | absence · absence | — |
| ApexCharts | native | responsive | types · strong | apexcharts/types/apexcharts.d.ts:1487 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | unknown | — | conflict · unknown | — |
| Vega-Lite | none | — | absence · absence | — |
| AG Charts | unknown | — | conflict · unknown | — |
| amCharts 5 | native | grep: ResponsiveTheme | grep · weak | @amcharts/amcharts5/.internal/themes/ResponsiveTheme.d.ts:27 |
| Google Charts | none | — | absence · absence | — |
| uPlot | none | — | absence · absence | — |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | unknown | — | conflict · unknown | — |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | none | — | absence · absence | — |