I've tried using
Code: Select all
Chart1.toImage('test', 'png')(
I've tried some common non-TeeChart methods such as:
Code: Select all
href = "document.getElementById('Canvas1').toDataURL();"
Thanks in advance,
Code: Select all
Chart1.toImage('test', 'png')(
Code: Select all
href = "document.getElementById('Canvas1').toDataURL();"
Code: Select all
<button onclick="getPngChart();">Get Png</button>
Code: Select all
function getPngChart() {
var element = document.createElement('a');
element.setAttribute('href', document.getElementById('canvas').toDataURL('image/png'));
element.setAttribute('download', 'chart.png');
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
In that case, you have to get your image resource in a cross-origin compliant way.Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |