Options for customizing the tooltip borders, including the color and width of the tooltip’s border.
number
Duration of the tooltip animation, specified in milliseconds.
Defaults to 300
boolean
If set to true, enables tooltips for the data points.
Defaults to false.
boolean
If set to true, the tooltip will animate as it moves from one point to another.
Defaults to true.
boolean
When set to true, highlights all points in the hovered series while dimming points in other series for better focus and clarity.
Defaults to false.
boolean
If set to true, enables the marker in the chart tooltip.
Defaults to true.
boolean
Wraps the tooltip’s long text based on the available space.
Note that this feature applies only to chart tooltips.
Defaults to false
number
Duration of the fade-out animation for hiding the tooltip, in milliseconds.
Defaults to 1000
Specifies the mode for the fade-out animation when hiding the tooltip.
Defaults to Move
string
The fill color of the tooltip, specified as a valid CSS color string in hex or rgba format.
Defaults to null
string
Specifies the format for customizing the content of the tooltip.
Defaults to null.
string
Customizes the header text for the tooltip. By default, this property displays the series name.
Defaults to null
Specifies the location of the tooltip relative to the chart. If x is 20, the tooltip moves 20 pixels to the right of the chart.
<div id='Chart'></div>
let chart: Chart = new Chart({
...
tooltip: {
enable: true,
location: { x: 100, y: 150 }
}
...
});
chart.appendTo('#Chart');
number
The opacity of the tooltip, expressed as a numerical value.
Defaults to null
boolean
If set to true, a single tooltip will be displayed for each index.
Defaults to false.
boolean
Specifies whether the nearest points should be included in the shared tooltip. By default, the nearest data points are displayed. Set this property to false to exclude the nearest point.
Defaults to true
string
| Function
A custom template used to format the tooltip content. Use ${x}
and ${y}
as placeholders for the corresponding data points.
Defaults to null.
This property defines the font family, size, style, weight, and color for the tooltip text.