-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Thresholds: auto fit thresholds into vertical axis #113238
Conversation
Pinging @elastic/kibana-vis-editors (Team:VisEditors) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine! Code LGTM, I tested it locally and works as it is described in the issue.
About the padding I don't have strong opinion. It would make sense to me but then we should decide the padding value.
@ghudgins how do you feel about it?
@@ -395,6 +397,41 @@ export function XYChart({ | |||
min = extent.lowerBound; | |||
max = extent.upperBound; | |||
} | |||
} else { | |||
const axisHasTreshold = thresholdLayers.some(({ yConfig }) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo, axisHasThreshold :D
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…3238) * ✨ Make threshold fit into view automatically * 🐛 do not compute axis threshold extends if no threshold is present * ✅ One more fix for 0-based extends and tests * 📝 fix typo Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…114104) * ✨ Make threshold fit into view automatically * 🐛 do not compute axis threshold extends if no threshold is present * ✅ One more fix for 0-based extends and tests * 📝 fix typo Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Summary
Fixes #112795
This PR includes thresholds into the vertical axis computation to fit them together with the data.
Main points:
Note 1:
Does it make sense add some padding to the extends in cases as the ones below?
Note 2: the auto extends does not apply for the horizontal axis:
Checklist
Delete any items that are not applicable to this PR.