Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto min value on log scale #916

Closed
3 tasks done
nickofthyme opened this issue Nov 24, 2020 · 5 comments · Fixed by #1014 or #1032
Closed
3 tasks done

Auto min value on log scale #916

nickofthyme opened this issue Nov 24, 2020 · 5 comments · Fixed by #1014 or #1032
Labels
:axis Axis related issue enhancement New feature or request kibana cross issue Has a Kibana issue counterpart released Issue released publicly

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented Nov 24, 2020

Is your feature request related to a problem? Please describe.
When using a log scale the min value is hard coded to 1.

export const LOG_MIN_ABS_DOMAIN = 1;

This causes issues in charts with a dataset with values less than 1 causing the values to not be shown.

image

https://codesandbox.io/s/happy-fog-pkd1j?file=/src/App.tsx

Describe the solution you'd like
EC should detect the min value from the data. Also, allow users to set the min log value via settings.

Describe alternatives you've considered
Setting explicit min domain value.

Kibana Cross Issues
elastic/kibana#83917

Checklist

  • this request is checked against already exist requests
  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
@nickofthyme nickofthyme added enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :axis Axis related issue labels Nov 24, 2020
@th0ger
Copy link

th0ger commented Nov 25, 2020

Yes this seems to be related with (if not introduced by) PR #896

I would also add to the solution in PR #896 , that setting "dummy 1 baseline for log y scale" is not ideal, since there can be values 0<x<1. It would be better to set that baseline value to the minimum of the y-axis (whether that value is found via autoscaling, fixing it by "axis extents" or any other means).

My comments only apply for the log-scale case.

@nickofthyme
Copy link
Collaborator Author

Yup totally, this baseline value was added to match the kibana functionality for log scales. I think the intent was to limit the compression of data when most of the data is in a higher order of magnitude while only a few are in a much lower order of magnitude. But really this is hiding potentially valuable data. I could see this as an optional value but not set by default.

@th0ger
Copy link

th0ger commented Nov 25, 2020

Yes, for example in some datasets 0 may be stored like 1e-17 or so due to limited precision of calculations.

But it should be up to the user to set an (optional) lowest value that the ymin autoscaling can obtain. I don't mean a fixed value, but a lowest threshold for the autoscaling.

But in fact, one could simply filter the data for y<y_threshold. So is it really needed?

@markov00
Copy link
Member

🎉 This issue has been resolved in version 25.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Feb 16, 2021
@markov00
Copy link
Member

markov00 commented Mar 1, 2021

🎉 This issue has been resolved in version 25.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:axis Axis related issue enhancement New feature or request kibana cross issue Has a Kibana issue counterpart released Issue released publicly
Projects
None yet
3 participants