Add all data in the tooltip of Chart JS

Viewed 2560

I have created a Chart JS 2 graph that have two datasets.

When I hover over a line I get only the current line's data but I want to see the other line's data too.

enter image description here

How can I add all the data from the specific date in the tooltip?

2 Answers

for chart.js version 3.x use tooltip:

options: {
   tooltip: {
      mode: 'index'
   },
   ...
}
Related