Legend position
native
Top/right/bottom/left/inside placement
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.legend.position.
top, right, bottom, left, and inside. A funnel draws it when legend is set.
Source: chartkit:packages/core/src/generated/schema.ts:173
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": "units"
},
"a11y": {
"alt": "Units rose in Q2."
},
"size": {
"width": 640,
"height": 260
},
"legend": {
"position": "bottom"
}
}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: legend.position.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: positionplugins.legend.position | grep · weak | chart.js/dist/types/layout.d.ts:3 |
| Recharts | native | Legend.verticalAlign, Legend.align | types · strong | recharts/types/component/Legend.d.ts:84 |
| Apache ECharts | native | legend.orient, legend.left | types · strong | echarts/types/dist/shared.d.ts:4343 |
| Highcharts | native | legend.align, legend.verticalAlign | types · strong | highcharts/highcharts.d.ts:13400 |
| Plotly.js | native | layout.legend.x, layout.legend.orientation | types · strong | plot-schema.json#layout.layoutAttributes.legend.x |
| Nivo | native | grep: anchorlegends[].anchor / direction / translateX | grep · weak | @nivo/tree/dist/types/types.d.ts:8 |
| Victory | native | VictoryLegend.x, VictoryLegend.orientation | types · strong | victory-core/lib/victory-util/common-props.d.ts:15 |
| visx | partial | LegendOrdinal.directionplacement is manual layout | types · strong | @visx/legend/lib/legends/Legend/index.d.ts:31 |
| ApexCharts | native | legend.position, legend.horizontalAlign | types · strong | apexcharts/types/apexcharts.d.ts:4598 |
| Tremor (npm) | unknown | — | unverified · unknown | — |
| Observable Plot | partial | grep: legendrendered as separate element | grep · weak | @observablehq/plot/src/scales.d.ts:3 |
| Vega-Lite | native | grep: orient | grep · weak | 590: "orient" |
| AG Charts | native | grep: position | grep · weak | ag-charts-community/dist/types/src/module-support.d.ts:42 |
| amCharts 5 | native | grep: layout | grep · weak | @amcharts/amcharts5/index.d.ts:19 |
| Google Charts | native | grep: position | grep · weak | @types/google.visualization/index.d.ts:504 |
| uPlot | partial | Options.legendbelow chart only | types · strong | uplot/dist/uPlot.d.ts:388 |
| TradingView Lightweight Charts | unknown | — | conflict · unknown | — |
| MUI X Charts | native | grep: positionslotProps.legend.position | grep · weak | @mui/x-charts/ChartsLegend/useAxis.d.ts:5 |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | native | grep: position | grep · weak | @antv/g2/lib/index.d.ts:2 |