Chart.LabelList

Values drawn onto the marks.

JanFebMarAprMayJun01020304050243128354238
Chart of Projects published over 6 points
monthProjects published
January24
February31
March28
April35
May42
June38
<Chart.LabelList marks="bars" />

API

PropTypeDefault
formatter((value: number) => string)formatTickValueFormats each label. Use it for units and locale — the raw number is passed in.
gapnumberMirrors Chart.Bars; only read when marks is bars.
marks"bars" | "points""points"Which mark the labels belong to, because the two anchor differently. points (the default) puts each label on the series point — right for Chart.Line, Chart.Area and Chart.Points. bars puts it at the end of that series' OWN bar. A grouped bar chart splits its category slot into one lane per series, while the series point sits at the centre of the whole slot — so the label lands over the middle of the group rather than over the bar it describes. With a single series the two coincide, which is why this only appears once a second key is added. Stacked bars have the same problem for a different reason: every segment but the first starts off a running total, not the baseline. Pass bars beside any Chart.Bars, mirroring the stacked and gap you gave it so the lanes line up.
offsetnumber8Distance from the mark, along the value axis.
seriesKeystringSeries to label. Defaults to the first of the root's value keys.
stackedbooleanMirrors Chart.Bars; only read when marks is bars.

Plus every <g> prop. Source: chart/components/chart-label-list.tsx.

marks is the prop that catches people out: labels anchor to the series point by default, which is right for lines and areas but lands over the middle of a grouped bar chart rather than over the bar being described. Pass bars beside any Chart.Bars, mirroring its stacked and gap.