-
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] Combined histogram/range aggregation for numbers #76121
Conversation
@cchaos @AlonaNadler The PR is in good shape to be reviewed now. The panel does not show the I think that probably the |
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
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.
Most of this review is based on the idea that there should be consistency between how we expose these options in Visualize and Lens, not because we can't do something different, but because I don't think these differences are intentional.
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx
Outdated
Show resolved
Hide resolved
@wylieconlon @AlonaNadler @cchaos the PR is up-to-date with the latest design anche changes requested. |
@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.
@flash1293 I think this reverted it to handle in a different way: It broke the original behaviour but perhaps there's a way to have the same result at higher level? |
@dej611 We can sort that out separately, thanks for linking to the change |
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.
Very nice work! I think we can merge this and make some behavioral tweaks later.
export const DEFAULT_INTERVAL = 1000; | ||
export const AUTO_BARS = 'auto'; | ||
export const MIN_HISTOGRAM_BARS = 1; | ||
export const SLICES = 6; |
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.
My opinion on the granularity settings has changed a bit since we last talked about it. The main reason is that with these settings, there is a big jump from 1 bar to 10-16 bars, which prevents me from getting anything in between. I'm not sure what the right tweak is, but if I could hardcode my "optimal" steps it might be something like [1, 5, 10, 20, 40, 80, 100, 200]
.
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.
I have some concerns about an hardcoded set of values:
- we might have to think about a strategy in case the user specify a
maxHistogramBars
value which is not covered in the list - because the range input starts with the middle mark, the list might have an odd number of values
Because of 1) I feel we may fall again under a slices approach - maybe it's a rare scenario ok -, while for 2) it's more a stylistic reason.
...ck/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.test.tsx
Outdated
Show resolved
Hide resolved
Great work @dej611 👍 👏
|
@AlonaNadler I see. |
This is a limitation we can't work around right now because of the reasons discussed in the last weekly (we don't know the actual data distribution in the config UI). I think the current UI does a good job at working with this limitation but it's not perfect. Once we expose the currently rendered data we can think about how to improve this experience. |
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.
@dej611 I pushed a design cleanup commit essentially adding some tooltips to the buttons and fixing accessibility and layouts. LGTM from my side. It would be nice if we could eventually add a tooltip generally to the "Granularity" label explaining the concept, but I won't hold up this PR anymore.
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
* master: (31 commits) skip tests for old pacakge (elastic#78194) [Ingest Pipelines] Add url generator for ingest pipelines app (elastic#77872) [Lens] Rename "telemetry" to "stats" (elastic#78125) [CSM] Url search (elastic#77516) [Drilldowns] Config to disable URL Drilldown (elastic#77887) [Lens] Combined histogram/range aggregation for numbers (elastic#76121) Remove legacy plugins support (elastic#77599) 'Auto' interval must be correctly calculated for natural numbers (elastic#77995) [CSM] fix ingest data retry order messed up (elastic#78163) Add response status helpers (elastic#78006) Bump react-beautiful-dnd (elastic#78028) [Security Solution][Detection Engine] Bubbles up more error messages from ES queries to the UI (elastic#78004) Index pattern - refactor constructor (elastic#77791) Add `xpack.security.sameSiteCookies` to docker allow list (elastic#78192) Remove [key: string]: any; from IIndexPattern (elastic#77968) Remove requirement for manage_index_templates privilege for Index Management (elastic#77377) [Ingest Manager] Agent bulk actions UI (elastic#77690) [Metrics UI] Add inventory view timeline (elastic#77804) Reporting/Docs: Updates for setting to enable CSV Download (elastic#78101) Update to latest rum-react (elastic#78193) ...
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co> Co-authored-by: cchaos <caroline.horn@elastic.co>
#78287) Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co> Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co> Co-authored-by: cchaos <caroline.horn@elastic.co>
Summary
This PR introduces the combined histogram/range aggregation in Lens as a single operation.
Granularity
range input set to the middle of the rangeGranularity
level (now there are 7 "ticks" available)from
value:to
value is+Infinity
) then it's still ok:It is possible to drag and drop range intervals
An invalid range interval happens when
from > to
This PR is still a WIP, the full list of tasks to complete is the following:
Max bars
work correctly => Now unified range inputGranularity
UI => compute it based on STEPS and MAX_HISTOGRAM_BARS configuredGranularity
UIAuto interval
UIauto
interval to histogram AggConfig #76001 for fullauto interval
goodnessRelated issue #59424
Checklist
Delete any items that are not applicable to this PR.