PieChartTooltipProps
Represents the configuration options for tooltips in a pie chart.
Props
The following table outlines the props for the PieChartTooltipProps:
| Name | Type | Default | Description |
|---|---|---|---|
| border | { color: '', width: 1, dashArray: '' } | Defines customization options for the tooltip border, including color, width, and dash pattern. | |
| duration | number | 300 | Sets the duration of tooltip animations in milliseconds. |
| enable | boolean | false | When set to |
| enableAnimation | boolean | true | When set to |
| fadeOutDuration | number | 150 | Controls how long the fade-out animation lasts when hiding the tooltip. |
| fadeOutMode | Move | Specifies the fade-out animation mode when hiding the tooltip. Available options:
| |
| fill | string | '' | Sets the background color of the tooltip. Accepts any valid CSS color value (hex, RGB, named colors). |
| format | string | '' | Defines a custom format string for tooltip content displayed when hovering over data points. The format can include placeholder tokens that will be replaced with actual values:
|
| formatter | (props: PieChartTooltipFormatterProps) => string | string[] | boolean | null | A callback function that allows for custom rendering of chart tooltips. This function is invoked for each tooltip and receives its properties as an argument. Available arguments:
|
| headerText | string | '' | Customizes the header text displayed at the top of the tooltip. By default, displays the series name. |
| location | { x: 0, y: 0 } | Specifies a fixed position for the tooltip relative to the chart.
For example, | |
| opacity | number | 1 | Controls the transparency level of the tooltip. Values range from 0 (fully transparent) to 1 (fully opaque). |
| showHeaderLine | boolean | false | When set to |
| showMarker | boolean | true | When set to |
| template | ((props: PieChartTooltipTemplateProps) => node) | null | Custom template function for rendering the tooltip content. This function receives the data point properties and returns a JSX element to access the data point values. |
| textStyle | { color: '', fontFamily: '', fontStyle: 'Normal', fontWeight: 'Normal', opacity: 1 } | Defines the font styling for the tooltip text, including font family, size, weight, and color. |