Chartjs-Trigger tooltip 'labelColor' callback in Angular test

0👍

I think you could access to the tooltip object, instead of the tooltip configuration.

In the tooltip object (chart.tooltip), there is an array labelColors, with all label color objects.

expect(chart.tooltip.labelColors[0].backgroundColor).tobe('#ed0453');

Leave a comment