February 2019
Beginner to intermediate
284 pages
6h 20m
English
With callbacks, you can dynamically generate the text contents and colors of the items displayed in a tooltip based on data values and other accessible attributes. The Callbacks are properties of the tooltips.callbacks object, which can be configured globally (Chart.defaults.global.tooltips.callbacks) or locally per chart instance (options.tooltips.callbacks). They are listed in the table as follows:
|
Object |
Parameters |
Description |
|
beforeTitle, title, afterTitle |
(item[], data); array of datasets in data.datasets; array of labels in data.labels; each item element contains the following properties: x, y, xLabel, yLabel, index, dataSetIndex. |
The title function returns the text for the tooltip title. You can also ... |
Read now
Unlock full access