【发布时间】:2021-08-20 07:14:38
【问题描述】:
我的问题与How to export the percentage value in amchart V3 export functionality基本相同,但使用amcharts v4而不是v3:我想导出amcharts使用chart.exporting功能计算的百分比值。
这是我目前所拥有的。我计算百分比并将它们显示在图表中:
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';
然后,我正在配置导出:
chart.exporting.menu = new am4core.ExportMenu();
chart.exporting.dataFields = {
hoursCount: 'Name of bins',
clientsCount: 'Number of clients',
};
但是,如何将 amcharts v4 计算的 pct 添加到导出中?
【问题讨论】: