Chart.Legend

The series key, driven by `config`.

JanFebMarAprMayJun01020304050
Chart of Projects published, Proposals accepted over 6 points
monthProjects publishedProposals accepted
January2418
February3122
March2825
April3530
May4236
June3833
<Chart.Legend />

API

Chart.Legend

PropTypeDefault
align"bottom" | "top""bottom"Which edge of the chart the legend sits against.
contentReactNodeReplaces the default body. Omit it to get Chart.LegendContent.

Plus every <div> prop. Source: chart/components/chart-legend.tsx.

Chart.LegendContent

PropTypeDefault
hideIconbooleanfalseDrops the swatch, leaving labels only.
nameKeystringField naming the config entry for each row. Pass it on charts coloured per row (a pie): without it the legend lists the series instead.

Plus every <div> prop. Source: chart/components/chart-legend-content.tsx.

The legend is ordinary HTML portalled into the root's overlay layer, so it needs room reserved for it in Chart.Root's margin — about 24px at the bottom.