[Chartjs]-Chartjs – show elements in all datasets on hover using bar chart

14πŸ‘

βœ…

The property is actually stored in tooltips like this :

options: {
    tooltips: {
        // Overrides the global setting
        mode: 'label'
    }
}

Check your updated fiddle to see it working, and here is its result :

enter image description here

3πŸ‘

For Chart.js 3, label mode is replaced by index and tooltips should be placed as tooltip in plugin object.

Below is working for chartjs 3.

plugins: {
  tooltip: {
    mode: 'index',
    position: 'average',
  }
}

2πŸ‘

For Chart.js 3.7.1 this is what worked for me

options: {
    interaction: {
        mode: 'index'
    }
}

Documented under ChartJs Interactions Documentation

Leave a comment