songlinn commented on a change in pull request #16286:
URL: https://github.com/apache/echarts/pull/16286#discussion_r775477608
##########
File path: src/util/number.ts
##########
@@ -138,7 +138,7 @@ export function round(x: number | string, precision:
number, returnStr: false):
export function round(x: number | string, precision: number, returnStr: true):
string;
export function round(x: number | string, precision?: number, returnStr?:
boolean): string | number {
if (precision == null) {
- precision = 10;
+ precision = ROUND_SUPPORTED_PRECISION_MAX;
Review comment:
What do you think auto calculate precision by number decimal place
length?
such as :
if (precision == null) {
const exp = String(x).split('e')[1];
precision = Number(-exp) || 10;
}`
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]