[Lens] Legend Statistics feature#182357
Conversation
8484cff to
26459f8
Compare
285a428 to
b49431a
Compare
b22aa80 to
d1d4681
Compare
d1d4681 to
e3ae1e2
Compare
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
|
/ci |
dej611
left a comment
There was a problem hiding this comment.
The ability to define legend stats for a single series without bucketing is a bit confusing to me:
Is this an expected behaviour or a bug?
Another confusing behaviour, to me, is the fact that Extra large size, when stats are enabled, leads to a shorter layout than Auto:
With percentage charts there are another couple of interesting things (not blocker for this PR, but nice to have a follow up):
DiffandDiff %in this case are a bit confusing in the table- It would be nice to limit the values to 2 digits by default (see the last row in the picture below)
x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/visualizations/xy/legend_stats_telemetry_helpers.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/index.tsx
Outdated
Show resolved
Hide resolved
nickofthyme
left a comment
There was a problem hiding this comment.
Code changes mostly LGTM, just a few comments.
Playing around with the new options feels good. Still testing a few edges before approving.
...expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.test.ts
Show resolved
Hide resolved
x-pack/plugins/lens/public/shared_components/legend/layout/columns_number_setting.tsx
Show resolved
Hide resolved
src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
Outdated
Show resolved
Hide resolved
…lbar_redesign_legend_stats
Fixed, that's not possible anymore
That's because Extra large is just a number (230px) while auto is calculated based on the content. i've consulted with @gvnmagni and we'll follow up on this one
The formatter is taken from the dimension formatter. After talking to @teresaalvarezsoler, I found out that there was a discussion about it, but the decision is not to do anything about it till we hear some user feedback. The user can easily fix it by changing the dimension formatter.
Yes, it's because most of the TSVB charts have last or current value shown by default and we don't want these charts to display the table, but the old view. This is something we decided with @markov00 and yourself on one of the syncs we had. Here's the default TSVB chart, adding the table here as a default would seem a bit invasive: |
x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx
Outdated
Show resolved
Hide resolved
dej611
left a comment
There was a problem hiding this comment.
Tested again and it works great now 🚀
nickofthyme
left a comment
There was a problem hiding this comment.
These changes LGTM, new options work great. I think we might run into issues with elastic/elastic-charts#1686 now that it is easier to create very wide inside legends but that needs to be addressed in @elastic/charts.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [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: cc @mbondyra |



Summary
Fixes #183887
lens_legend_stats- triggered if any stats is in legendlens_legend_stats_${TYPE}- triggered for specific types, if user has 2 statistics (eg. AVG and MIN) two events are triggered.and counting how many they use
lens_legend_stats_amount_1lens_legend_stats_amount_2lens_legend_stats_amount_3lens_legend_stats_amount_4_7lens_legend_stats_amount_above_8