Failed to create chart: can’t acquire context from the given item. Button intransigence

dear members!

A very tricky problem on my website has been plaguing me for several weeks. I have a page counter that lets me cycle through the available pages. However, it is never displayed or hidden. And the only thing the console evaluates for me is: “Failed to create chart: can’t acquire context from the given item”

Interestingly however, as soon as I move to a different section of my website and then return to my problem screen, the error message no longer comes up and the page counter works.

What is even more interesting is that this problem does not arise when using Mozilla Firefox and simply because everything works and is displayed. No error logging, no overlapping, everything runs smoothly.

It’s an Angular server, which I start locally via VSC.
Yes! I have already stated that this problem case has been listed here in stackoverflow quite often. However, in no relation to my scenario.

Highest esteem to anyone who has an adequate clue to my plight.

I tried to set logs, read the outcomes. Fix the overlapping with padding.
I failed miserably when trying to understand the workflow of chart.js in connection with CANVAS.