Justin-ZS commented on PR #20838: URL: https://github.com/apache/echarts/pull/20838#issuecomment-2975815826
> It should be helpful to provide a feature to _nice_ the min/max value of the axis. Thanks for the help! However, I don't think this should be the default behavior, and this also has a compatibility problem. > > For the current implementation, when `dataMax` is larger than the actual data max, a niced value that is no smaller than the `dataMax` is used; while when `dataMax` is smaller than the actual data max, it's not used at all. This behavior seems really confusing to me. > > I would suggest using `max: 'niceDataMax'` instead of providing a new option, and the data max is calculated to be a nice number automatically without providing a value. Does this satisfy your requirement? Regarding compatibility, there should be no issues。 The behavior remains unchanged when `dataMin/dataMax` are not set. To solve the use case, we need both: 1. User-defined max value 2. Enable nice rounding or not With `max: 'niceDataMax'` alone, we can't achieve both because: - It only enable the nice rounding - But can't let users specify a reference max value -- 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]
