Bar width / gap / padding
native
Control bar thickness and spacing
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.mark.gap.
Source: chartkit:packages/core/src/generated/schema.ts:855
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "bar",
"data": [
{
"lane": "A",
"stops": 12
},
{
"lane": "C",
"stops": 15
}
],
"encoding": {
"x": "lane",
"y": "stops"
},
"a11y": {
"alt": "Lane C has more."
},
"size": {
"width": 640,
"height": 260
},
"mark": {
"gap": 0.35
}
}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: mark.bar.width.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | ChartConfiguration.data.datasets.barPercentage, ChartConfiguration.data.datasets.categoryPercentage | types · strong | chart.js/dist/types/index.d.ts:114 |
| Recharts | native | BarChart.barCategoryGap, BarChart.barGap | types · strong | recharts/types/util/types.d.ts:1323 |
| Apache ECharts | native | series.barWidth, series.barGap | types · strong | echarts/types/dist/shared.d.ts:11141 |
| Highcharts | native | plotOptions.column.pointPadding, plotOptions.column.groupPadding | types · strong | highcharts/options/column.d.ts:1124 |
| Plotly.js | native | layout.bargap, layout.bargroupgap | types · strong | plot-schema.json#layout.layoutAttributes.bargap |
| Nivo | native | Bar.padding, Bar.innerPadding | types · strong | @nivo/bar/dist/types/types.d.ts:144 |
| Victory | native | VictoryBar.barWidth, VictoryBar.barRatio | types · strong | victory-bar/lib/victory-bar.d.ts:10 |
| visx | native | grep: paddingInnerband scale padding | grep · weak | @visx/scale/lib/types/ScaleConfig.d.ts:31 |
| ApexCharts | native | plotOptions.bar.columnWidth, plotOptions.bar.barHeight | types · strong | apexcharts/types/apexcharts.d.ts:3100 |
| Tremor (npm) | native | BarChart.barCategoryGap | types · strong | @tremor/react/dist/index.d.ts:103 |
| Observable Plot | native | grep: insetinset + band padding | grep · weak | @observablehq/plot/src/scales.d.ts:1 |
| Vega-Lite | native | grep: binSpacingmark.width / scale.paddingInner | grep · weak | 3067: "binSpacing" |
| AG Charts | native | series.width | types · strong | ag-charts-types/dist/types/src/series/cartesian/barOptions.d.ts:80 |
| amCharts 5 | native | grep: widthcolumns.template width % | grep · weak | @amcharts/amcharts5/.internal/plugins/exporting/Exporting.d.ts:48 |
| Google Charts | native | ColumnChartOptions.bar | types · strong | @types/google.visualization/index.d.ts:721 |
| uPlot | partial | grep: sizebars({size:[factor, max]}) | grep · weak | 70: /** destroys DOM, removes resize & scroll listeners, etc. */ |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | native | BarChart.xAxis | types · strong | @mui/x-charts/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.mts:25 |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: padding | grep · weak | @antv/g2/lib/runtime/component.d.ts:14 |