Features · layout

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.

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,
    "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.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: aspectRatiogrep · weakchart.js/dist/types/index.d.ts:506
RechartsnativeResponsiveContainer.aspecttypes · strongrecharts/types/component/ResponsiveContainer.d.ts:8
Apache EChartsunknown—conflict · unknown—
Highchartspartialchart.height'56%' percentage heighttypes · stronghighcharts/highcharts.d.ts:6350
Plotly.jsunknown—conflict · unknown—
Nivonone—absence · absence—
VictorypartialVictoryChart.widthviewBox scales with fixed ratiotypes · strongvictory-core/lib/victory-util/common-props.d.ts:55
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsunknown—conflict · unknown—
Tremor (npm)none—absence · absence—
Observable Plotnativegrep: aspectRatiogrep · weak@observablehq/plot/src/plot.d.ts:22
Vega-Litenone—absence · absence—
AG Chartsunknown—conflict · unknown—
amCharts 5none—absence · absence—
Google Chartsunknown—conflict · unknown—
uPlotnone—absence · absence—
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsunknown—conflict · unknown—
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2none—absence · absence—