javascript apexcharts to base 64 image

JavaScript
chart = new ApexCharts(
	document.querySelector("#myChart"),
	options
);

chart.render();

var dataURL = chart.dataURI().then((uri) => {
	console.log(uri);
});

Source

Also in JavaScript: