Features · legend

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.

Units rose in Q2.Units rose in Q2.40455055Q1Q2units
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: positionplugins.legend.positiongrep · weakchart.js/dist/types/layout.d.ts:3
RechartsnativeLegend.verticalAlign, Legend.aligntypes · strongrecharts/types/component/Legend.d.ts:84
Apache EChartsnativelegend.orient, legend.lefttypes · strongecharts/types/dist/shared.d.ts:4343
Highchartsnativelegend.align, legend.verticalAligntypes · stronghighcharts/highcharts.d.ts:13400
Plotly.jsnativelayout.legend.x, layout.legend.orientationtypes · strongplot-schema.json#layout.layoutAttributes.legend.x
Nivonativegrep: anchorlegends[].anchor / direction / translateXgrep · weak@nivo/tree/dist/types/types.d.ts:8
VictorynativeVictoryLegend.x, VictoryLegend.orientationtypes · strongvictory-core/lib/victory-util/common-props.d.ts:15
visxpartialLegendOrdinal.directionplacement is manual layouttypes · strong@visx/legend/lib/legends/Legend/index.d.ts:31
ApexChartsnativelegend.position, legend.horizontalAligntypes · strongapexcharts/types/apexcharts.d.ts:4598
Tremor (npm)unknown—unverified · unknown—
Observable Plotpartialgrep: legendrendered as separate elementgrep · weak@observablehq/plot/src/scales.d.ts:3
Vega-Litenativegrep: orientgrep · weak590: "orient"
AG Chartsnativegrep: positiongrep · weakag-charts-community/dist/types/src/module-support.d.ts:42
amCharts 5nativegrep: layoutgrep · weak@amcharts/amcharts5/index.d.ts:19
Google Chartsnativegrep: positiongrep · weak@types/google.visualization/index.d.ts:504
uPlotpartialOptions.legendbelow chart onlytypes · stronguplot/dist/uPlot.d.ts:388
TradingView Lightweight Chartsunknown—conflict · unknown—
MUI X Chartsnativegrep: positionslotProps.legend.positiongrep · weak@mui/x-charts/ChartsLegend/useAxis.d.ts:5
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2nativegrep: positiongrep · weak@antv/g2/lib/index.d.ts:2