From a1e5bbe0c90d8be5da62b419840d03a3086310cd Mon Sep 17 00:00:00 2001 From: El-Chiang Date: Tue, 19 Oct 2021 17:46:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9tickCount=E8=AE=A1?= =?UTF-8?q?=E7=AE=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/f2-next/src/controller/scale/cat-tick.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/f2-next/src/controller/scale/cat-tick.ts b/packages/f2-next/src/controller/scale/cat-tick.ts index 49d38a443..c0fb9eb85 100644 --- a/packages/f2-next/src/controller/scale/cat-tick.ts +++ b/packages/f2-next/src/controller/scale/cat-tick.ts @@ -10,7 +10,7 @@ export default cfg => { } // 获取间隔步长, 最小是1 - const step = Math.round(values.length / (tickCount - 1)) || 1; + const step = Math.floor(values.length / (tickCount - 1)) || 1; const ticks = []; // 按间隔数取对应节点