[Chartjs]-Angular-chartJs change chart background and highlight colors

1๐Ÿ‘

โœ…

I found a solution. It seems I have to use exactly this wording:

colors: [{
    backgroundColor: '#FF6384',
    pointBackgroundColor: '#FF6384'
}, {
    backgroundColor: '#36A2EB',
    pointBackgroundColor: '#36A2EB'
}],

So the pointBackgroundColor would change the chart color not the backgroundColor itself. The backgroundColor is needed for the hover effect, so the pointedBackground would be invisible and the background comes to the front.

Thanks to @Dominik Heim, your link was a big help!

1๐Ÿ‘

can you provide full code? would it make more easy for qualified answer.

Based on that https://stackoverflow.com/a/28654829/6629704 i assume, that you possibly should add two more colors to array, since maybe the 3rd and 4th position of array would define highlight Colors

Leave a comment