Features · layout

Responsive width (fill container)

native

Auto-resize to the container

Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.size.width.

'auto' fills container and follows resizes

Source: chartkit:packages/core/src/generated/schema.ts:1097

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
  }
}

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.responsive.md.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: responsivegrep · weakchart.js/dist/types/index.d.ts:1650
RechartsnativeResponsiveContainertypes · strongrecharts/types/component/ResponsiveContainer.d.ts:76
Apache EChartsnativegrep: resizechart.resize() on window resize (manual hook)grep · weakecharts/types/src/util/types.d.ts:348
Highchartsnativechart.reflowtypes · stronghighcharts/highcharts.d.ts:6538
Plotly.jsnativeconfig.responsivetypes · strongplot-schema.json#config.responsive
NivonativeResponsiveLinetypes · strong@nivo/line/dist/types/ResponsiveLine.d.ts:4
VictorynativeVictoryChart.widthresponsive via viewBox by defaulttypes · strongvictory-core/lib/victory-util/common-props.d.ts:55
visxnativeParentSize, ScaleSVGtypes · strong@visx/responsive/lib/components/ParentSize.d.ts:20
ApexChartsnativechart.width'100%'types · strongapexcharts/types/apexcharts.d.ts:1765
Tremor (npm)nativeLineChartfills parent by defaulttypes · strong@tremor/react/dist/index.d.ts:130
Observable Plotmanualgrep: renderfixed width; re-render on resizemechanism · weak@observablehq/plot/src/scales.d.ts:166
Vega-Litenativegrep: containerwidth: 'container'grep · weak4264: "description"
AG Chartsnativegrep: widthfills container by defaultgrep · weakag-charts-types/dist/types/src/serverSideRenderingOptions.d.ts:6
amCharts 5nativegrep: autoResizeroot autoResizegrep · weak@amcharts/amcharts5/.internal/core/Root.d.ts:373
Google Chartsunknown—redraw on resizeunverified · unknown—
uPlotmanualOptions.hookssetSize() on resizemechanism · weakuplot/dist/uPlot.d.ts:394
TradingView Lightweight Chartsnativegrep: autoSizegrep · weak938: * Please pay attention that `autoSize` option and explicit sizes options `width` and `height` don't conflict with one another.
MUI X ChartsnativeLineChart.widthfills parent when omittedtypes · strong@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.mts:25
Mermaid (chart-ish diagrams only)nativegrep: useMaxWidthgrep · weakmermaid/dist/setupGraphViewbox.d.ts:1
AntV G2nativegrep: autoFitgrep · weak@antv/g2/lib/component/slider.d.ts:7