You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2022/01/21 02:20:45 UTC

[echarts] 01/01: fix(scale): fix rounding error when increase interval in align ticks.

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch fix-interval-rounding
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 85adb428fbd352547d75f88de8e19a5b057f31a6
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Jan 21 10:18:57 2022 +0800

    fix(scale): fix rounding error when increase interval in align ticks.
---
 src/scale/helper.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/scale/helper.ts b/src/scale/helper.ts
index cbd8fcf..3302b16 100644
--- a/src/scale/helper.ts
+++ b/src/scale/helper.ts
@@ -92,7 +92,7 @@ export function increaseInterval(interval: number) {
     else { // f is 1 or 5
         f *= 2;
     }
-    return f * exp10;
+    return round(f * exp10);
 }
 
 /**

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org