Utilizing mustache.js, I am injecting a view file into a designated <div>
.
Within this view, I have incorporated a canvas element situated inside a specific div, showcasing a chart created with Chart.js.
<div>
<canvas id="gesundheitsverlauf-chart">
Your web-browser does not support the HTML 5 canvas element.
</canvas>
</div>
The initial rendering of the chart occurs smoothly. However, upon navigating away and returning to the view, the chart flickers intermittently.
Despite deactivating animation and configuring the following settings:
responsive: true,
maintainAspectRatio: false,
I seek solutions to address the flickering issue.
Is there a method to validate whether the chart has been previously rendered on the canvas? If so, I would halt further drawing until requested by the user.