PieLegend
import { PieLegend } from '@wick-charts/react'; <PieLegend seriesId='pie'> {({ slices, mode, format }) => ( <ul>{slices.map(s => <li key={s.label}>{s.label}: {format(s.value)}</li>)}</ul> )}</PieLegend>Companion to <PieSeries> — renders slice labels with their value or percent, anchored to one of three positions (bottom, right, overlay).
Companion to <PieSeries> — renders slice labels with their value or percent, anchored to one of three positions (bottom, right, overlay).
Props
Render prop
// children: (ctx: PieLegendRenderContext) => ReactNode<PieLegend> {({ slices, mode, format }) => ( <ul>{slices.map(s => <li key={s.label}>{s.label}: {format(s.value)}</li>)}</ul> )}</PieLegend>