ChartTooltipProps
Represents the configuration model for tooltips in charts.
Props
The following table outlines the props for the ChartTooltipProps:
| Name | Type | Default | Description |
|---|---|---|---|
| border | { color: '', width: 1, dashArray: '' } | Customizes the tooltip border, including color and width. | |
| 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 | 1000 | 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 | null | Sets the background color of the tooltip. Accepts any valid CSS color value (hex, RGB, named colors). |
| format | string | null | 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 | (text: string | string[]) => 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 | null | 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 | null | Controls the transparency level of the tooltip. Values range from 0 (fully transparent) to 1 (fully opaque). |
| shared | boolean | false | When set to |
| showHeaderLine | boolean | false | When set to |
| showMarker | boolean | true | When set to |
| showNearestPoint | boolean | true | When set to |
| showNearestTooltip | boolean | true | When set to |
| template | ((data: ChartTooltipTemplateProps) => JSX.Element | null) | 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. |