From 53805c8aa7720bfaa37540c365331da31f51914d Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 26 Jul 2022 12:22:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/components/normal/LabelNormal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue index 974df8fe34..e12dd21c57 100644 --- a/frontend/src/views/chart/components/normal/LabelNormal.vue +++ b/frontend/src/views/chart/components/normal/LabelNormal.vue @@ -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