API reference: @salmonui/charts/pie-chart
AccumulationBasePropsinterface
import type { AccumulationBaseProps } from '@salmonui/charts/pie-chart';interface AccumulationBaseProps {
readonly data?: readonly unknown[] | undefined;
readonly valueField?: string | undefined;
readonly labelField?: string | undefined;
readonly colorField?: string | undefined;
readonly palette?: readonly string[] | undefined;
readonly patterns?: boolean | undefined;
readonly emptyPoints?: 'drop' | 'zero' | 'average' | undefined;
readonly width?: number | undefined;
readonly height?: number | undefined;
readonly title?: string | undefined;
readonly subtitle?: string | undefined;
readonly description?: string | undefined;
readonly locale?: string | undefined;
readonly format?: Intl.NumberFormatOptions | ((value: number) => string) | undefined;
readonly legend?: boolean | AccumulationLegendOptions | undefined;
readonly tooltip?: boolean | AccumulationTooltipOptions | undefined;
readonly highlight?: boolean | undefined;
readonly selection?: boolean | {
readonly multiple?: boolean | undefined;
} | undefined;
readonly hiddenPoints?: readonly number[] | undefined;
readonly defaultHiddenPoints?: readonly number[] | undefined;
readonly onHiddenPointsChange?: ((hidden: readonly number[], event: AccumulationChangeEvent) => void) | undefined;
readonly selectedPoints?: readonly AccumulationPointRef[] | undefined;
readonly defaultSelectedPoints?: readonly AccumulationPointRef[] | undefined;
readonly onSelectedPointsChange?: ((selected: readonly AccumulationPointRef[], event: AccumulationChangeEvent) => void) | undefined;
readonly annotations?: readonly AccumulationAnnotation[] | undefined;
readonly getPointStyle?: ((point: AccumulationPoint) => AccumulationPointStyle | undefined) | undefined;
readonly formatLabel?: ((point: AccumulationPoint) => string) | undefined;
readonly onPointClick?: ((point: AccumulationPoint, event: AccumulationChangeEvent) => void) | undefined;
readonly onPointHover?: ((point: AccumulationPoint | null) => void) | undefined;
readonly showDataTable?: boolean | undefined;
readonly accessibleTable?: boolean | undefined;
readonly renderEmpty?: (() => ReactNode) | undefined;
readonly className?: string | undefined;
readonly style?: CSSProperties | undefined;
readonly id?: string | undefined;
readonly ref?: Ref<AccumulationApi> | undefined;
readonly onResize?: ((size: {
readonly width: number;
readonly height: number;
}) => void) | undefined;
readonly animated?: boolean | undefined;
}
| Name | Signature | Description |
|---|---|---|
dataoptional | readonly data?: readonly unknown[] | undefined; | Records, or numbers (labels then default to "1", "2", ...). |
valueFieldoptional | readonly valueField?: string | undefined; | |
labelFieldoptional | readonly labelField?: string | undefined; | |
colorFieldoptional | readonly colorField?: string | undefined; | Record field holding a data color ( |
paletteoptional | readonly palette?: readonly string[] | undefined; | Data colors by point index; default the derived |
patternsoptional | readonly patterns?: boolean | undefined; | Overlay one system fill pattern per palette slot (non-color encoding). |
emptyPointsoptional | readonly emptyPoints?: 'drop' | 'zero' | 'average' | undefined; | |
widthoptional | readonly width?: number | undefined; | |
heightoptional | readonly height?: number | undefined; | |
titleoptional | readonly title?: string | undefined; | |
subtitleoptional | readonly subtitle?: string | undefined; | |
descriptionoptional | readonly description?: string | undefined; | Accessible description; default the automatic summary. |
localeoptional | readonly locale?: string | undefined; | |
formatoptional | readonly format?: Intl.NumberFormatOptions | ((value: number) => string) | undefined; | |
legendoptional | readonly legend?: boolean | AccumulationLegendOptions | undefined; | |
tooltipoptional | readonly tooltip?: boolean | AccumulationTooltipOptions | undefined; | |
highlightoptional | readonly highlight?: boolean | undefined; | Dim the other points while one is hovered or focused. Default true. |
selectionoptional | readonly selection?: boolean | {
readonly multiple?: boolean | undefined;
} | undefined; | Click and Enter select points. |
hiddenPointsoptional | readonly hiddenPoints?: readonly number[] | undefined; | |
defaultHiddenPointsoptional | readonly defaultHiddenPoints?: readonly number[] | undefined; | |
onHiddenPointsChangeoptional | readonly onHiddenPointsChange?: ((hidden: readonly number[], event: AccumulationChangeEvent) => void) | undefined; | |
selectedPointsoptional | readonly selectedPoints?: readonly AccumulationPointRef[] | undefined; | |
defaultSelectedPointsoptional | readonly defaultSelectedPoints?: readonly AccumulationPointRef[] | undefined; | |
onSelectedPointsChangeoptional | readonly onSelectedPointsChange?: ((selected: readonly AccumulationPointRef[], event: AccumulationChangeEvent) => void) | undefined; | |
annotationsoptional | readonly annotations?: readonly AccumulationAnnotation[] | undefined; | |
getPointStyleoptional | readonly getPointStyle?: ((point: AccumulationPoint) => AccumulationPointStyle | undefined) | undefined; | |
formatLabeloptional | readonly formatLabel?: ((point: AccumulationPoint) => string) | undefined; | |
onPointClickoptional | readonly onPointClick?: ((point: AccumulationPoint, event: AccumulationChangeEvent) => void) | undefined; | |
onPointHoveroptional | readonly onPointHover?: ((point: AccumulationPoint | null) => void) | undefined; | |
showDataTableoptional | readonly showDataTable?: boolean | undefined; | Visible accessible data table ( |
accessibleTableoptional | readonly accessibleTable?: boolean | undefined; |
|
renderEmptyoptional | readonly renderEmpty?: (() => ReactNode) | undefined; | |
classNameoptional | readonly className?: string | undefined; | |
styleoptional | readonly style?: CSSProperties | undefined; | |
idoptional | readonly id?: string | undefined; | |
refoptional | readonly ref?: Ref<AccumulationApi> | undefined; | |
onResizeoptional | readonly onResize?: ((size: {
readonly width: number;
readonly height: number;
}) => void) | undefined; | |
animatedoptional | readonly animated?: boolean | undefined; | Entrance and update transitions, default |