显示堆积列的总数

问题描述 投票:1回答:1

我在报告中有以下设置来显示堆积列的总数:enter image description here

我也尝试过,[[总]],“[[总]]等等。

但我得到:

enter image description here

与最后一列的值相同。

显示堆叠列总值的正确方法是什么?

EDIT1

尝试了第一个提出的解决方案,它给出了以下内容:

enter image description here

其中所有标签都使用相同的文本格式化。

iccube iccube-reporting
1个回答
0
投票

为了达到这个结果,您需要:

1)在“总文本”字段中,在值轴高级设置enter image description here中添加“[[total]]”

2)接下来,您应该覆盖图表设置中的“标签功能”。 enter image description here enter image description here

功能代码

 /**
 * Return label text
 */

function(graphDataItem, formattedText) {
    var total = graphDataItem.values.total;
    var formattedTotal = AmCharts.formatNumber(total, { 
        precision: 2,
        decimalSeparator: ".",
        thousandsSeparator: " "
    }, 2);
    return formattedTotal;
}

结果:enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.