mirror of
https://github.com/dataease/dataease.git
synced 2026-06-12 08:21:09 +08:00
fix: 在指标设置为“占比”的情况下,钻取可能触发 / by zero 报错
This commit is contained in:
@@ -1379,6 +1379,9 @@ public class ChartViewService {
|
||||
if (StringUtils.isEmpty(cValue)) {
|
||||
continue;
|
||||
}
|
||||
if (sum.equals(new BigDecimal(0))) {
|
||||
continue;
|
||||
}
|
||||
item[dataIndex] = new BigDecimal(cValue)
|
||||
.divide(sum, 8, RoundingMode.HALF_UP)
|
||||
.toString();
|
||||
|
||||
Reference in New Issue
Block a user