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

ovilia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 3d2690a8ed4f250c9d275fea3fff7e3375b61c43
Author: Ovilia <zwl.s...@gmail.com>
AuthorDate: Thu Sep 26 15:54:24 2019 +0800

    feat(util): quantityExponent(0) should return 0
---
 src/util/number.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/number.js b/src/util/number.js
index 39c99c7..106fc4f 100644
--- a/src/util/number.js
+++ b/src/util/number.js
@@ -394,7 +394,7 @@ export function quantity(val) {
  * @return {number}
  */
 export function quantityExponent(val) {
-    return Math.floor(Math.log(val) / Math.LN10);
+    return val > 0 ? Math.floor(Math.log(val) / Math.LN10) : 0;
 }
 
 /**


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

Reply via email to