Tooltips are the main feature used by Chart.js to reveal quantitative details about data. While some context comes from the grid, the only way to natively display data right next to the data point is using a tooltip. Of course, you can label the value points as we saw in the previous chapter, but that requires extensions or plugins, and may clutter your chart if used in excess. Chart.js visualizations rely on interactivity to show details. In this section, we will learn how to configure the way these details are displayed.
Tooltips can be configured for each chart using the tooltips key in the options object. They can also be configured for all charts using Chart.defaults.global.tooltips. The properties of these objects that you can configure are listed in the following table:
Object |
Value |
Description |
titleSpacing |
Number |
Space before and after... |