Explicit domain (min/max)
native
Fix axis min and max
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.encoding.y.scale.domain.
Source: chartkit:packages/core/src/generated/schema.ts:689
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": {
"field": "units",
"scale": {
"domain": [
0,
80
]
}
}
},
"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: scale.domain.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: suggestedMinscales.y.min / max / suggestedMin | grep · weak | chart.js/dist/types/index.d.ts:1210 |
| Recharts | native | YAxis.domain | types · strong | recharts/types/cartesian/YAxis.d.ts:53 |
| Apache ECharts | native | yAxis.min, yAxis.max | types · strong | echarts/types/dist/shared.d.ts:2630 |
| Highcharts | native | yAxis.min, yAxis.max | types · strong | highcharts/highcharts.d.ts:110317 |
| Plotly.js | native | layout.yaxis.range | types · strong | plot-schema.json#layout.layoutAttributes.yaxis.range |
| Nivo | native | Line.yScale | types · strong | @nivo/line/dist/types/types.d.ts:132 |
| Victory | native | VictoryChart.domain | types · strong | victory-chart/lib/victory-chart.d.ts:15 |
| visx | native | grep: domain | grep · weak | @visx/stats/lib/ViolinPlot.d.ts:2 |
| ApexCharts | native | yaxis.min, yaxis.max | types · strong | apexcharts/types/apexcharts.d.ts:5049 |
| Tremor (npm) | native | LineChart.minValue, LineChart.maxValue | types · strong | @tremor/react/dist/index.d.ts:70 |
| Observable Plot | native | grep: domain | grep · weak | @observablehq/plot/src/scales.d.ts:197 |
| Vega-Lite | native | grep: domain | grep · weak | 524: "description" |
| AG Charts | native | grep: minaxes[].min / max | grep · weak | ag-charts-types/dist/types/src/presets/sparkline/sparklineOptions.d.ts:49 |
| amCharts 5 | native | grep: strictMinMax | grep · weak | @amcharts/amcharts5/.internal/charts/xy/series/XYSeries.d.ts:35 |
| Google Charts | native | grep: viewWindow | grep · weak | @types/google.visualization/index.d.ts:547 |
| uPlot | native | grep: rangescales.y.range / min / max | grep · weak | 131: /** re-ranges a given min/max by a multiple of the range's magnitude (used internally to expand/snap/pad numeric y scales) */ |
| TradingView Lightweight Charts | native | grep: autoscaleInfoProvider | grep · weak | 536:export interface AutoScaleMargins { |
| MUI X Charts | native | LineChart.yAxis.min, LineChart.yAxis.max | types · strong | @mui/x-charts/models/axis.d.mts:467 |
| Mermaid (chart-ish diagrams only) | native | MermaidConfig.xyCharty-axis min --> max | types · strong | mermaid/dist/config.type.d.ts:225 |
| AntV G2 | native | grep: domain | grep · weak | @antv/g2/lib/runtime/types/options.d.ts:100 |