[Chartjs]-How to filter hover on a chart in ChartJS?

2👍

You can use hoverBackgroundColor. Just use the same color code for the grey.

backgroundColor: [
  "#646c9a",
  "#FDFDFD"
],

hoverBackgroundColor: [
  "#8389ae",
  "#FDFDFD"
],

Disadvantage: You have to think of a highlighted color code for your other datasets. It might be easier with rgba values so you only have to change the alpha value and not calculate or think of another color code.

Leave a comment