Features · layout

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.

Units rose in Q2.Units rose in Q2.40455055Q1Q2
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: layoutoptions.layout.paddinggrep · weakchart.js/dist/types/layout.d.ts:3
RechartsnativeLineChart.margintypes · strongrecharts/types/util/types.d.ts:1247
Apache EChartsnativegrid.left, grid.righttypes · strongecharts/types/dist/shared.d.ts:7606
Highchartsnativechart.margin, chart.spacingtypes · stronghighcharts/highcharts.d.ts:6391
Plotly.jsnativelayout.margintypes · strongplot-schema.json#layout.layoutAttributes.margin
NivonativeLine.margintypes · strong@nivo/line/dist/types/types.d.ts:134
VictorynativeVictoryChart.paddingtypes · strongvictory-core/lib/victory-util/common-props.d.ts:39
visxmanualGroupmargins are yoursmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativegrid.paddingtypes · strongapexcharts/types/apexcharts.d.ts:5293
Tremor (npm)unknown—conflict · unknown—
Observable Plotnativegrep: margingrep · weak@observablehq/plot/src/scales.d.ts:626
Vega-Litenativegrep: paddinggrep · weak609: "description"
AG Chartsnativegrep: paddinggrep · weakag-charts-types/dist/types/src/presets/sparkline/sparklineAxisOptions.d.ts:15
amCharts 5nativegrep: paddingLeftgrep · weak@amcharts/amcharts5/.internal/charts/hierarchy/Treemap.d.ts:34
Google Chartsnativegrep: chartAreagrep · weak@types/google.visualization/index.d.ts:493
uPlotnativeOptions.paddingtypes · stronguplot/dist/uPlot.d.ts:384
TradingView Lightweight Chartsunknown—conflict · unknown—
MUI X ChartsnativeLineChart.margintypes · strong@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.mts:36
Mermaid (chart-ish diagrams only)nativegrep: plotReservedSpacePercentgrep · weakmermaid/dist/internals.d.ts:34
AntV G2nativegrep: margingrep · weak@antv/g2/lib/data/wordCloud.d.ts:76