API reference: @salmonui/charts/tree-map
TreeMapLeavesinterface
import type { TreeMapLeaves } from '@salmonui/charts/tree-map';interface TreeMapLeaves {
readonly labelField?: string | undefined;
readonly format?: Intl.NumberFormatOptions | ((value: number) => string) | undefined;
readonly labelPosition?: TreeMapLabelPosition | undefined;
readonly labelOverflow?: 'trim' | 'hide' | 'wrapWord' | 'wrap' | undefined;
readonly render?: ((item: TreeMapItem) => ReactNode) | undefined;
readonly gap?: number | undefined;
readonly showValue?: boolean | undefined;
}
| Name | Signature | Description |
|---|---|---|
labelFieldoptional | readonly labelField?: string | undefined; | |
formatoptional | readonly format?: Intl.NumberFormatOptions | ((value: number) => string) | undefined; | Value format in the label and tooltip. |
labelPositionoptional | readonly labelPosition?: TreeMapLabelPosition | undefined; | |
labelOverflowoptional | readonly labelOverflow?: 'trim' | 'hide' | 'wrapWord' | 'wrap' | undefined; | |
renderoptional | readonly render?: ((item: TreeMapItem) => ReactNode) | undefined; | HTML content laid over the leaf instead of the drawn label. |
gapoptional | readonly gap?: number | undefined; | Gap between leaves, px. Default 1. |
showValueoptional | readonly showValue?: boolean | undefined; | Show |