jfrancos-mai commented on PR #24012: URL: https://github.com/apache/superset/pull/24012#issuecomment-1599520031
> Pinged a couple of reviewers, but I'm a little nervous that this might cause as many problems as it solves. If your data has a range of integers from 1-10, for example, then this would cause 20 steps in that range, and may cause queries to fail. > > If this is intended specifically for values between 0 and 1, maybe an agreeable compromise is: `const step = max <= 1 ? stepHeuristic(min, max) : 1;` Hi @rusackas, happy to make that adjustment but a couple questions about it: > `const step = max <= 1 ? stepHeuristic(min, max) : 1;` Did you mean: `const step = max - min <= 1 ? stepHeuristic(min, max) : 1;`? Also, I do like ``` const step = max - min <= 1 ? stepHeuristic(min, max) : 1; ``` but wondering if you wouldn't prefer ``` const step = max - min <= 1 ? stepHeuristic(min, max) : undefined; ``` (where `undefined` should result in antd's default value of `1`). I agree that using `1` instead of `undefined` is better, as explicit is better than implicit, but maybe it's better to make that change as part of a separate issue? -- 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]
