-
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] Add gauges visualization #118616
[Lens] Add gauges visualization #118616
Conversation
ec6359c
to
25f430d
Compare
037fcff
to
bb0db71
Compare
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
4ff5a02
to
423743e
Compare
… it should be chosen over the default)
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.
Thanks for making those requested changes so quickly, @mbondyra! This looks wonderful. In my last test, I found two (hopefully small) items that I comment on below. Once these are addressed, I think I'm good to approve.
- I noticed that the layer panels for gauge-type visualizations don't have a layer-level chart selector. Should we have a selector there that allows users to switch between compatible chart types (i.e. switch between horizontal and vertical gauges)?
- For the band color configurations, do we need to include the color continuity options (at least until the new color range enhancements are integrated into Lens)? Right now it appears to the user cannot change from the default "above range" behavior.
Discussed offline:
|
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 the feature locally on Safari and could not spot bugs 👍 .
I have still few questions for things which are not 100% clear to me:
-
Why having a static value by default for a metric? Maybe there's a use case I'm missing here.
-
What should happen for array values and last_value?
- I've tried to use the ecommerce dataset with the
price
field andlast_value
and got "no results".
- I've tried to use the ecommerce dataset with the
- I thought that maybe there were no values, so I've added a filtered metric there, still no results:
-
Maybe it makes sense to not show anything as "multiple" values are in the field, but a warning might be helpful here. Also, suggestions should be filtered if leads to the same results, I think.
-
Ticks on bands could propose a help icon there to explain what that means.
- sometimes enabling the feature doesn't do much as there's no misalignment yet between ticks and bands.
-
While I like the "suggested" mechanism here for min/max, I think that it is too easy to have a gauge with no defined min/max on a dashboard. I do not see this type of chart particularly useful, unless has been already defined a use case for that.
- If not preventing the user to save that type of gauge, can we, at least show some warning on save about that? Even better would be a warning on the Lens panel in the dashboard explaining the problem.
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.
Per our conversation yesterday, this looks good from my perspective. Thanks, @mbondyra!
What should happen for array values and last_value? - I've changed the behavior to instead take the last value from the array. |
@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.
Thanks Stratoula, I'll css things around to see if it can help! EDIT: FIXED |
💛 Build succeeded, but was flaky
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
To update your PR or re-run it, just comment with: |
* add gauge chart expression * excluding staticValue from suggestion for other visualizations * adding prioritized operation for visualization groups (when dropping, it should be chosen over the default) * changing the group for metric in chart switcher * only access the activeData if exists (avoids error in console) * Adding gauge chart * round nicely the maximum value * fix warnings * fixing rounding * fixing tests * suggestions tests * suggestions tbc * tests for staticValue limitations * added tests to visualization.ts * correct bands * wip * added tests * suggestions * palete fixes & tests * fix magic max * metric should not overflow * address review * [Lens] adding toolbar tests * limit domain to <min, max> * changes the order of experimental badge and dataLoss indicator * fix i18n * address feedback p1 * don't show required nor optional for max/min dimensions * fix types * tests fixed * fix types * last piece of gauge feedback * change naming from title and subtitle to labelMajor and labelMinor * fix bug with percent color bands * functional tests * metric shouldn't have static value * pass formatter to metric * fake formatter * fix css and replace emptyPlaceholder * fix tests * fix static values * name changes * breaking functional Co-authored-by: Kibana Machine <[email protected]>
Summary
Leftovers: #121376
Fixes #89859
Default settings:
Visualization settings
Dimensions settings
Metric
- ticks and color bands are not aligned unless user click on the setting in Visualization settings