Features · legend

Values in legend

native

Show the current/last value next to each series name

Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.legend.values.

last value (line) or slice value (donut); line values are drawn on createRenderer([line]) since PR #17 (main 116d0af)

Source: chartkit:packages/core/src/generated/schema.ts:181

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
  },
  "legend": {
    "values": true
  }
}

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.values.md.

LibraryStatusOptionVerificationSource
Chart.jsunknown—conflict · unknown—
RechartspartialLegend.formattertypes · strongrecharts/types/component/DefaultLegendContent.d.ts:83
Apache EChartsnativelegend.formattertypes · strongecharts/types/dist/shared.d.ts:4306
Highchartsnativelegend.labelFormattertypes · stronghighcharts/highcharts.d.ts:13522
Plotly.jsnone—absence · absence—
Nivonone—absence · absence—
Victorynone—absence · absence—
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativelegend.formattertypes · strongapexcharts/types/apexcharts.d.ts:4607
Tremor (npm)none—absence · absence—
Observable Plotnone—absence · absence—
Vega-Litenone—absence · absence—
AG Chartsunknown—unverified · unknown—
amCharts 5nativegrep: valueTextgrep · weak@amcharts/amcharts5/.internal/charts/xy/series/XYSeries.d.ts:497
Google Chartsnone—absence · absence—
uPlotnativeOptions.legend.livelive values on hovertypes · stronguplot/dist/uPlot.d.ts:279
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsnone—absence · absence—
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: itemValuegrep · weak@antv/g2/lib/spec/interaction.d.ts:5