Chartjs-How would I include toBase64Image class using the fxcosta library for Chart.js

0👍

The only thing toBase64Image is, is a wrapper around the default canvas.toDataUrl so it only renames it. This means you can just get the canvas ID in your application and call the toDataUrl on it

Documentation of toDataUrl: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL

Chart.js implementation: https://github.com/chartjs/Chart.js/blob/1df4883aff050e9e320f9327be96e228fcc588cc/src/core/core.controller.js#L885

Leave a comment