Struggling download chartjs chart with watermark

After integrate, watermark, html2canvas correctly render canvas.


change from html2canvas to chartjs instance

chart.canvas.toDataURL("image/png") // raise because watermark.image cross domain origin


copy the remote image url to local

import localImg from 'path to image'

watermark: {

image: localImg

...

}