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');
- Chartjs-How to add an input box next to Chart.js y axis label?
- Chartjs-Overlap horizontalBar graps using ChartJS
Source:stackexchange.com