fix:: 自定义指标数值格式化保留3位小数
This commit is contained in:
@@ -368,6 +368,9 @@ function fnGetListTitle() {
|
||||
width: 100,
|
||||
minWidth: 150,
|
||||
maxWidth: 300,
|
||||
customRender: (opt:any) => {
|
||||
return parseFloat(opt.text).toFixed(3);
|
||||
},
|
||||
});
|
||||
}
|
||||
columns.push({
|
||||
@@ -463,8 +466,8 @@ function fnGetList() {
|
||||
kpiId: columns.key,
|
||||
title: columns.title,
|
||||
unit: columns.unit,
|
||||
max: values.length > 0 ? Math.max(...values) : 0,
|
||||
min: values.length > 0 ? Math.min(...values) : 0,
|
||||
max: values.length > 0 ? Math.max(...values).toFixed(3) : 0,
|
||||
min: values.length > 0 ? Math.min(...values).toFixed(3) : 0,
|
||||
avg,
|
||||
total: total,
|
||||
});
|
||||
@@ -639,7 +642,7 @@ function fnRanderChartData() {
|
||||
for (const y of chartDataYSeriesData) {
|
||||
for (const key of keys) {
|
||||
if (y.key === key) {
|
||||
y.data.push(+item[key]);
|
||||
y.data.push(parseFloat(item[key]).toFixed(3));
|
||||
chartDataXAxisData.push(parseDateToStr(item['timeGroup']));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user