Margins / padding
native
Space around the plot area
Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.size.padding.
size.padding, number or per-side object; drawn on createRenderer([line]) since PR #17 (main 116d0af)
Source: chartkit:packages/core/src/generated/schema.ts:1113
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,
"padding": {
"left": 48,
"right": 16,
"top": 12,
"bottom": 28
}
}
}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.margin.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: layoutoptions.layout.padding | grep · weak | chart.js/dist/types/layout.d.ts:3 |
| Recharts | native | LineChart.margin | types · strong | recharts/types/util/types.d.ts:1247 |
| Apache ECharts | native | grid.left, grid.right | types · strong | echarts/types/dist/shared.d.ts:7606 |
| Highcharts | native | chart.margin, chart.spacing | types · strong | highcharts/highcharts.d.ts:6391 |
| Plotly.js | native | layout.margin | types · strong | plot-schema.json#layout.layoutAttributes.margin |
| Nivo | native | Line.margin | types · strong | @nivo/line/dist/types/types.d.ts:134 |
| Victory | native | VictoryChart.padding | types · strong | victory-core/lib/victory-util/common-props.d.ts:39 |
| visx | manual | Groupmargins are yours | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | native | grid.padding | types · strong | apexcharts/types/apexcharts.d.ts:5293 |
| Tremor (npm) | unknown | — | conflict · unknown | — |
| Observable Plot | native | grep: margin | grep · weak | @observablehq/plot/src/scales.d.ts:626 |
| Vega-Lite | native | grep: padding | grep · weak | 609: "description" |
| AG Charts | native | grep: padding | grep · weak | ag-charts-types/dist/types/src/presets/sparkline/sparklineAxisOptions.d.ts:15 |
| amCharts 5 | native | grep: paddingLeft | grep · weak | @amcharts/amcharts5/.internal/charts/hierarchy/Treemap.d.ts:34 |
| Google Charts | native | grep: chartArea | grep · weak | @types/google.visualization/index.d.ts:493 |
| uPlot | native | Options.padding | types · strong | uplot/dist/uPlot.d.ts:384 |
| TradingView Lightweight Charts | unknown | — | conflict · unknown | — |
| MUI X Charts | native | LineChart.margin | types · strong | @mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.mts:36 |
| Mermaid (chart-ish diagrams only) | native | grep: plotReservedSpacePercent | grep · weak | mermaid/dist/internals.d.ts:34 |
| AntV G2 | native | grep: margin | grep · weak | @antv/g2/lib/data/wordCloud.d.ts:76 |