This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch fix-11249 in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 80e69da175ed9efa339e70b93efaf5eb6c029fb2 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