Hi Qi,
Greetings from Syncfusion.
We have analyzed your query and we can achieve your requirement using export method. In that button click, we have export a chart into a PNG format.
For more formation about export, kindly find the below documentation and demo link,
Code snippet:
<button id='export'>Export</button>
<div id="container"></div>
import { Chart, RadarSeries, LineSeries, Export } from '@syncfusion/ej2-charts';
Chart.Inject(LineSeries, RadarSeries, Export)
let chart: Chart = new Chart({
//
});
chart.appendTo('#container');
document.getElementById('export').onclick = function() {
chart.exportModule.export('PNG', 'chart');
} |
Kindly revert us, if you need further assistance. We are always happy in assisting you.
Regards,
Baby.