Aspect ratio sizing
native
Height derived from width by ratio
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.size.aspectRatio.
Source: chartkit:packages/core/src/generated/schema.ts:1105
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "line",
"data": [
{
"quarter": "Q1",
"units": 40
},
{
"quarter": "Q2",
"units": 55
}
],
"encoding": {
"x": "quarter",
"y": "units"
},
"a11y": {
"alt": "Units rose in Q2."
},
"size": {
"width": 640,
"height": 260,
"aspectRatio": 2
}
}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.aspect.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: aspectRatio | grep · weak | chart.js/dist/types/index.d.ts:506 |
| Recharts | native | ResponsiveContainer.aspect | types · strong | recharts/types/component/ResponsiveContainer.d.ts:8 |
| Apache ECharts | unknown | — | conflict · unknown | — |
| Highcharts | partial | chart.height'56%' percentage height | types · strong | highcharts/highcharts.d.ts:6350 |
| Plotly.js | unknown | — | conflict · unknown | — |
| Nivo | none | — | absence · absence | — |
| Victory | partial | VictoryChart.widthviewBox scales with fixed ratio | types · strong | victory-core/lib/victory-util/common-props.d.ts:55 |
| visx | manual | Group | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | unknown | — | conflict · unknown | — |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: aspectRatio | grep · weak | @observablehq/plot/src/plot.d.ts:22 |
| Vega-Lite | none | — | absence · absence | — |
| AG Charts | unknown | — | conflict · unknown | — |
| amCharts 5 | none | — | absence · absence | — |
| Google Charts | unknown | — | conflict · unknown | — |
| 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 | — |