-
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
TSVB should use "histogram:maxBars" and "histogram:barTarget" settings for auto instead of a default 100 buckets #83628
Conversation
@elasticmachine merge upstream |
1 similar comment
@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.
In this first round of comments I'm mostly commenting on the behavior. Here's what I noticed:
-
I think it would be save to increase the histogram limit well past 100 by default. Why not set it as high as 65k, which is the limit in ES for now?
-
Similar to the issues we saw with auto histograms for numbers, it's confusing that the slider doesn't actually change anything automatically. What we decided for Lens was that an unlabeled slider with 5 "steps" is a pretty good way of doing this
-
I'd like to tweak the form design even more, maybe we can use the idea of the "granularity" slider that Lens has?
|
||
return calculateAuto.near(100, duration).asSeconds(); | ||
return calcAutoIntervalLessThan(maxBars, timerange).asSeconds(); |
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.
Okay so if I understand correctly this is the core part of the change, previously auto was hardcoded to 100, and now it's up to 100?
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.
Yes that true. Now we read histogram:maxBars
configuration property as a limit value. The user can change it if necessary.
…default 120 buckets Closes: elastic#54012
@timroes @wylieconlon Today I tried various options for making this functionality obvious to users. What do you think about next option: regardless of the |
@alexwizp I like linking this up to the existing advanced settings. I also support Wylie's ask here for control of the level of detail. On the specific UI: I guess I'd not put a percentage on this slider, since it might cause confusion again: "What does 100% mean?" "So 50% will always be half of the 100%?" (which due to rounding it might not afaik). I guess I would just label the two sides of the slider "Coarse" and "Finest" and don't give the actual values within a label in the UI. |
Thank you @timroes and @wylieconlon. PR was updated |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@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.
I'm really liking the direction of this improvement! I've left a few more comments about the behavior and labeling, but I think I don't need to do another code review to approve the direction.
Before merging, please make sure the title and description are appropriate to be put directly into the release notes: https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html
This includes the checklist!
src/plugins/vis_type_timeseries/public/application/components/index_pattern.js
Outdated
Show resolved
Hide resolved
isEntireTimeRangeActive(model, isTimeSeries) || | ||
!(model[intervalName] === AUTO_INTERVAL || !model[intervalName]) | ||
} | ||
min={0} |
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 value is definitely wrong because it will never generate data. I think a value of 1 is probably too low as well. What do you think about 10?
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.
@wylieconlon I needed it earlier to correctly mark the scale from 0 to 100 with a step of 10. When entering a number other than 0, the scale would be shifted. I handle that case here:
Let's create a constant to make it a little obvious
Unfortunately even without a scale I cannot set1
as a min value cause the max - min
value must be a multiple of the step
property, otherwise I see an error. Looks like a problem with EUI component.
Also I'm not sure that 10 is a good default value for this property. I think for some cases 1 value can be useful and allows to emulate "Entire timerange mode" which we have on other tabs in TSVB. Please keep in mind that to see data for that case you should set
…index_pattern.js Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
# Conflicts: # src/plugins/data/server/server.api.md
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.
Updates to aggs service LGTM, thanks @alexwizp! Code review only
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
…s for auto instead of a default 100 buckets (elastic#83628) * TSVB needs a "tsvb:max_buckets" target setting for auto instead of a default 120 buckets Closes: elastic#54012 * remove calculate_auto * max bars -> Level of detail * rename allowLevelofDetail * fix PR comment * Update constants.ts * Update src/plugins/vis_type_timeseries/public/application/components/index_pattern.js Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> * create LEVEL_OF_DETAIL_MIN_BUCKETS constant * calcAutoIntervalLessThan -> search.aggs.calcAutoIntervalLessThan Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> # Conflicts: # src/plugins/data/server/server.api.md
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.
LGTM, didnt test it locally
* master: (41 commits) [Maps] fix code-owners (elastic#84265) [@kbn/utils] Clean target before build (elastic#84253) [code coverage] collect for oss integration tests (elastic#83907) [APM] Use `asTransactionRate` consistently everywhere (elastic#84213) Attempt to fix incremental build error (elastic#84152) Unskip "Copy dashboards to space" (elastic#84115) Remove expressions.legacy from README (elastic#79681) Expression: Add render mode and use it for canvas interactivity (elastic#83559) [deb/rpm] Move systemd service to /usr/lib/systemd/system (elastic#83571) [Security Solution][Resolver] Allow a configurable entity_id field (elastic#81679) [ML] Space permision checks for job deletion (elastic#83871) [build] Provide ARM build of RE2 (elastic#84163) TSVB should use "histogram:maxBars" and "histogram:barTarget" settings for auto instead of a default 100 buckets (elastic#83628) [Workplace Search] Initial rendering of Org Sources (elastic#84164) update geckodriver to 0.28 (elastic#84085) Fix timelion vis escapes single quotes (elastic#84196) [Security Solution] Fix incorrect time for dns histogram (elastic#83532) [DX] Bump TS version to v4.1 (elastic#83397) [Security Solution] Add endpoint policy revision number (elastic#83982) [Fleet] Integration Policies List view (elastic#83634) ...
…s for auto instead of a default 100 buckets (#83628) (#84250) * TSVB needs a "tsvb:max_buckets" target setting for auto instead of a default 120 buckets Closes: #54012 * remove calculate_auto * max bars -> Level of detail * rename allowLevelofDetail * fix PR comment * Update constants.ts * Update src/plugins/vis_type_timeseries/public/application/components/index_pattern.js Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> * create LEVEL_OF_DETAIL_MIN_BUCKETS constant * calcAutoIntervalLessThan -> search.aggs.calcAutoIntervalLessThan Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> # Conflicts: # src/plugins/data/server/server.api.md
Closes: #54012
Summary
This PR adds an additional
Level of detail
option for TSVB on theTime Series
tabThe mechanism for obtaining the maximum value of buckets has also been changed. Instead of a hard-coded value of
100
buckets, now we take this value from theuiSettings
by reading:histogram:maxBars
- max value for Max Bars input controlhistogram:barTarget
- default values for Max Bars input controlsrc/plugins/vis_type_timeseries/server/lib/vis_data/helpers/calculate_auto.js
was removed. We reused the same code from data pluginChecklist
Delete any items that are not applicable to this PR.
For maintainers