API reference: @salmonui/charts/chart
ChartDataLabelsinterface
import type { ChartDataLabels } from '@salmonui/charts/chart';interface ChartDataLabels {
readonly position?: 'outside' | 'top' | 'bottom' | 'middle' | 'auto' | undefined;
readonly format?: ChartFormat | ((ctx: ChartPointContext) => string) | undefined;
readonly angle?: number | undefined;
readonly showZero?: boolean | undefined;
readonly overlap?: 'none' | 'hide' | 'rotate90' | 'shiftY' | 'shiftX' | undefined;
readonly dedupe?: boolean | undefined;
readonly render?: ((ctx: ChartPointContext) => ReactNode) | undefined;
}
| Name | Signature | Description |
|---|---|---|
positionoptional | readonly position?: 'outside' | 'top' | 'bottom' | 'middle' | 'auto' | undefined; | |
formatoptional | readonly format?: ChartFormat | ((ctx: ChartPointContext) => string) | undefined; | |
angleoptional | readonly angle?: number | undefined; | |
showZerooptional | readonly showZero?: boolean | undefined; | |
overlapoptional | readonly overlap?: 'none' | 'hide' | 'rotate90' | 'shiftY' | 'shiftX' | undefined; | Smart labels: what a label that collides with an earlier one does (series order is priority). |
dedupeoptional | readonly dedupe?: boolean | undefined; | Drops a label whose text repeats the previous label of the series. |
renderoptional | readonly render?: ((ctx: ChartPointContext) => ReactNode) | undefined; | SVG content in place of the label text, placed at the label anchor. |