Multiple / dual y axes
native
Two or more value axes
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.encoding.y.axis=y2.
Source: chartkit:packages/core/src/generated/schema.ts:145
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",
"axis": "y2"
}
},
"a11y": {
"alt": "Units rose in Q2."
},
"size": {
"width": 640,
"height": 260
},
"axes": {
"y2": {
"title": "Other"
}
}
}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.multi.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: yAxisIDdataset.yAxisID + extra scales | grep · weak | chart.js/dist/types/index.d.ts:108 |
| Recharts | native | YAxis.yAxisId, Line.yAxisId | types · strong | recharts/types/cartesian/YAxis.d.ts:76 |
| Apache ECharts | native | series.yAxisIndex | types · strong | echarts/types/dist/shared.d.ts:8382 |
| Highcharts | native | series.yAxis, yAxis.opposite | types · strong | highcharts/highcharts.d.ts:100917 |
| Plotly.js | native | layout.yaxis.overlaying, layout.yaxis.side | types · strong | plot-schema.json#layout.layoutAttributes.yaxis.overlaying |
| Nivo | none | —single y scale per chart | absence · absence | — |
| Victory | partial | VictoryAxis.dependentAxisnormalised dual-axis recipe | types · strong | victory-core/lib/victory-theme/types.d.ts:42 |
| visx | partial | grep: AxisRightsecond scale + AxisRight manually | grep · weak | @visx/axis/lib/index.d.ts:4 |
| ApexCharts | native | yaxis.opposite, yaxis.seriesName | types · strong | apexcharts/types/apexcharts.d.ts:5036 |
| Tremor (npm) | unknown | — | conflict · unknown | — |
| Observable Plot | unknown | —one y scale per plot (facets instead) | conflict · unknown | — |
| Vega-Lite | native | grep: resolvelayer + resolve.scale.y independent | grep · weak | 2952: "AxisResolveMap" |
| AG Charts | native | grep: keysaxes[].keys binds series to an axis | grep · weak | ag-charts-community/dist/types/src/module-support.d.ts:16 |
| amCharts 5 | native | ValueAxispush multiple yAxes | types · strong | @amcharts/amcharts5/.internal/charts/xy/axes/ValueAxis.d.ts:264 |
| Google Charts | native | grep: targetAxisIndex | grep · weak | @types/google.visualization/index.d.ts:741 |
| uPlot | native | Options.axesseries.scale names a scale | types · strong | uplot/dist/uPlot.d.ts:381 |
| TradingView Lightweight Charts | native | grep: priceScaleIdleft/right/overlay price scales | grep · weak | 967: * - the price scale used when adding a series without an explicit `priceScaleId` |
| MUI X Charts | native | LineChart.yAxis | types · strong | @mui/x-charts/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.mts:31 |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | native | grep: independentscale.y.independent | grep · weak | @antv/g2/lib/runtime/types/common.d.ts:101 |