Chartjs-Chart.js value is two but only one display tooltip

3👍

You need to set tooltip­‘s mode to index
­­­­­­­­

...
tooltips: {
   mode: 'index', //<-- set this
   callbacks: {
      title: function(tooltipItems, data) {
         return new Date(tooltipItems[0].xLabel).format('MM/dd hh:mm:ss');
      }
   }
}
...

Leave a comment