From 3c3b5a251d6bebf993195221a4a255d5f31d9272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=A4=9A=E7=9B=8A?= Date: Mon, 28 Dec 2020 11:11:21 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E9=81=BF=E5=85=8D=20sparklink=20?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E5=80=BC=E7=9A=84=E6=97=B6=E5=80=99=E9=99=A4?= =?UTF-8?q?=E9=9B=B6=20(#1261)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SparkLine.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SparkLine.tsx b/src/components/SparkLine.tsx index 342fc8c2a..d4e772836 100644 --- a/src/components/SparkLine.tsx +++ b/src/components/SparkLine.tsx @@ -39,7 +39,7 @@ export class SparkLine extends React.Component { const values = value!.map(item => this.normalizeValue(item)); const max = Math.max(...values); const min = Math.min(...values); - const duration = max - min; + const duration = max - min || 1; const gap = width / (values.length - 1); const points: Array<{