Chartjs-Chart JS 2.x: How to show a tooltip in a timeline chart?

0๐Ÿ‘

โœ…

I had to add the intersect: false property to the tooltips

Updated JSFiddle

Tooltip code:

  tooltips: {
    enabled: true,
    intersect: false,
    titleFontSize: 0,
    callbacks: {
      label: function(tooltipItems, data) {
        return data.datasets[tooltipItems.datasetIndex].label || 'Other';
      },
    }
  }

Leave a comment