feat(视图): 数值格式化

This commit is contained in:
junjun 2022-07-26 12:22:41 +08:00
parent 0c73ae6cd3
commit 53805c8aa7

View File

@ -265,7 +265,7 @@ export default {
} catch (err) {
yAxis = JSON.parse(JSON.stringify(this.chart.yaxis))
}
const f = yAxis[0]
const f = (yAxis && yAxis.length > 0) ? yAxis[0] : null
if (f && f.formatterCfg) {
const v = valueFormatter(value, f.formatterCfg)
this.result = v.includes('NaN') ? value : v