My question is basically the same as How to export the percentage value in amchart V3 export functionality, but using amcharts v4 instead of v3: I want to export the percentage values calculated by amcharts using the chart.exporting functionality.
This is what I have so far. I calculate the percentages and show them in the graph:
const series = chart.series.push(new am4charts.ColumnSeries());
series.dataFields.categoryX = 'hoursCount';
series.dataFields.valueY = 'clientsCount';
series.name = 'Visits';
series.calculatePercent = true;
series.dataFields.valueYShow = 'percent';
Then, I'm configuring the export:
chart.exporting.menu = new am4core.ExportMenu();
chart.exporting.dataFields = {
hoursCount: 'Name of bins',
clientsCount: 'Number of clients',
};
However, how can I add the pct calculated by amcharts v4 to the export?