I'm working with Chart.js. When I mouse over one piece on Doughnut chart, I want to make less opaque the other pieces and don't lose the tooltip. this is the chart's first version
This is what i want to do -- when i mouse over one piece, other pieces need to be less opaque When i try to do this on hover event, i need to change backgroundColor color and update the chart. It works, it is changing chart color but because i update the chart, i lose my tooltip.
options = {
hover: {
onHover: (e, item: any) => {
if (item.length) {
item[0]._chart.config.data.datasets[0].backgroundColor = ['#131e3a', '#19284d', '#1f3260']
item[0]._chart.update();
}
}
},
Is there any way to update the chart colors but not lose the tooltip?