Chart.js API and HTML5 Canvas: State Synchronization During Concurrent Updates
Chart.js utilizes a reference-based system to manage datasets, where modifications to the data array are committed to the HTML5 Canvas via the update() method. To optimize performance, the library employs a requestAnimationFrame loop to batch these changes before the next render cycle. A design uncertainty arises when the update() method is invoked while a p