Interface for a class TooltipSettings
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.
boolean
If set to true, enables tooltips for the data points.
boolean
If set to true, the tooltip will animate as it moves from one point to another.
boolean
When set to true, highlights all points in the hovered series while dimming points in other series for better focus and clarity.
boolean
If set to true, enables the marker in the chart tooltip.
boolean
Wraps the tooltip’s long text based on the available space.
Note that this feature applies only to chart tooltips.
number
Duration of the fade-out animation for hiding the tooltip, in milliseconds.
Specifies the mode for the fade-out animation when hiding the tooltip.
string
The fill color of the tooltip, specified as a valid CSS color string in hex or rgba format.
string
Specifies the format for customizing the content of the tooltip.
string
Customizes the header text for the tooltip. By default, this property displays the series name.
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.
boolean
If set to true, a single tooltip will be displayed for each index.
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.
string
| Function
A custom template used to format the tooltip content. Use ${x}
and ${y}
as placeholders for the corresponding data points.
This property defines the font family, size, style, weight, and color for the tooltip text.