mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
fix(图表): 修复堆叠条形图,当堆叠项/维度是数值时,下钻异常的问题
This commit is contained in:
committed by
jianneng-fit2cloud
parent
eacc55d645
commit
5054d5cfcf
@@ -1311,7 +1311,8 @@ public class ChartDataBuild {
|
||||
if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5 || chartViewFieldDTO.getDeType() == 7) {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
|
||||
} else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3 || chartViewFieldDTO.getDeType() == 4) {
|
||||
if (view.getIsExcelExport()) {
|
||||
// 如果是在维度中展示,导出excel时展示为字符串,其它情况展示为数值类型
|
||||
if (view.getIsExcelExport() || StringUtils.equalsIgnoreCase(chartViewFieldDTO.getGroupType(), "d")) {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
|
||||
} else {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP));
|
||||
|
||||
Reference in New Issue
Block a user