API reference: @salmonui/charts/chart
ChartLegendOptionsinterface
import type { ChartLegendOptions } from '@salmonui/charts/chart';interface ChartLegendOptions {
readonly position?: 'auto' | 'top' | 'bottom' | 'start' | 'end' | undefined;
readonly title?: string | undefined;
readonly toggle?: boolean | undefined;
readonly highlight?: boolean | undefined;
readonly maxLabelWidth?: number | undefined;
readonly overflow?: 'wrap' | 'page' | undefined;
readonly columns?: number | undefined;
readonly reverse?: boolean | undefined;
readonly align?: 'start' | 'center' | 'end' | undefined;
readonly orientation?: 'horizontal' | 'vertical' | undefined;
readonly mode?: 'series' | 'point' | 'range' | 'gradient' | undefined;
readonly renderItem?: ((item: ChartLegendItem) => ReactNode) | undefined;
}
| Name | Signature | Description |
|---|---|---|
positionoptional | readonly position?: 'auto' | 'top' | 'bottom' | 'start' | 'end' | undefined; | |
titleoptional | readonly title?: string | undefined; | |
toggleoptional | readonly toggle?: boolean | undefined; | |
highlightoptional | readonly highlight?: boolean | undefined; | |
maxLabelWidthoptional | readonly maxLabelWidth?: number | undefined; | |
overflowoptional | readonly overflow?: 'wrap' | 'page' | undefined; | |
columnsoptional | readonly columns?: number | undefined; | |
reverseoptional | readonly reverse?: boolean | undefined; | |
alignoptional | readonly align?: 'start' | 'center' | 'end' | undefined; | Placement along the legend's edge (default |
orientationoptional | readonly orientation?: 'horizontal' | 'vertical' | undefined; |
|
modeoptional | readonly mode?: 'series' | 'point' | 'range' | 'gradient' | undefined; |
|
renderItemoptional | readonly renderItem?: ((item: ChartLegendItem) => ReactNode) | undefined; | Custom item content (HTML over the drawing; not part of the exported SVG). |