I am using Fusion Charts in Angular 7 and I want to export this chart in Base64 Image format.
I already tried the batchExport
method to export the chart as an image.
app.component.ts:
import * as FusionCharts from "fusioncharts";
ngOnInit() {
this.exportChart = {
chart: {
xaxisname: Month,
yaxisname: Count,
borderThickness: "4",
showvalues: "1",
theme: "fusion",
data: chartData
};
}
exportData() {
FusionCharts.batchExport({
exportFileName: "demoExport",
exportFormat: "jpg",
exportAtClientSide: "1"
});
}
}
app.component.html:
<button id='export_charts' (click)='exportData()' class="mb-10">Export Chart</button>
Please help me.
Thanks.