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
- Chartjs-How to fix the distance between horizontal points (x-axis) in chartJS
- Chartjs-How to hide radar chart index labels (chart.js)
Source:stackexchange.com