-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Extends Axis bounds for XY chart when using Interval operation #134020
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
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.
Looks almost good to me, noticed one small bug
const { inputValue: debouncedExtent, handleInputChange: setDebouncedExtent } = useDebouncedValue< | ||
const onExtentChange = useCallback( | ||
(newExtent) => { | ||
const { inclusiveZeroError, boundaryError } = validateExtent(hasBarOrAreaOnAxis, newExtent); |
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.
When switching from custom to data, this check is applied to undefined
/undefined
which is preventing an actual state change (the chart doesn't update). We should only validate for "custom" extends
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
@flash1293 it should be fixed now |
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.
Tested and works as expected, LGTM. Great feature!
Summary
Partially fixes #129308
This PR introduces the ability to extends or filter axis bounds when using the Interval operation on XY charts.
The code has been refactored to provide some shared functions and components for the feature.
The feature is available under the visualization axis controls and is set by default to
Data
:Switching to
Custom
will show a new range input prefilled with existing bounds:Notes
This implementation is very limited as it works only on the client side and for XY chart types.
Prior of this PR other approaches have been attempted which led to problems:
Interval
agg and produce all the buckets: [Lens] Extend bounds for Interval operation #132619Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers