-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat(legend): add legend stats (table view) #2426
Conversation
7c7aa4d
to
61da4e8
Compare
61da4e8
to
8238769
Compare
f7ced69
to
d19292b
Compare
a29e5cb
to
693a688
Compare
8b10eaa
to
6643841
Compare
7afe9e0
to
a4ca9c8
Compare
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.
Left some code reviews on a first pass.
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.
Just minor comments, in general it looks great and I haven't found any bug right now. I will keep testing it
packages/charts/src/components/legend/legend_table/legend_table_item.tsx
Outdated
Show resolved
Hide resolved
packages/charts/src/components/legend/legend_table/legend_table_item.tsx
Outdated
Show resolved
Hide resolved
ea44e88
to
2c58da4
Compare
2c58da4
to
f694948
Compare
e2dce2e
to
9e3ec3f
Compare
# [65.1.0](v65.0.0...v65.1.0) (2024-05-28) ### Bug Fixes * **deps:** update dependency @elastic/eui to ^94.5.0 ([#2433](#2433)) ([b13ded9](b13ded9)) * **deps:** update dependency @playwright/test to ^1.44.0 ([#2434](#2434)) ([faf36aa](faf36aa)) * **Metric:** should only show one focus halo on `::focus` event ([#2441](#2441)) ([96b0779](96b0779)) * react component type errors ([#2440](#2440)) ([f0b3a00](f0b3a00)) ### Features * **legend:** add legend stats (table view) ([#2426](#2426)) ([c22f767](c22f767))
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.
Excellent job 🎉 🚀
The code looks great and playing around with it works perfectly! I think the way you built it make it easily to merge this with the tooltip table if we decide to go that route.
I just left 2 follow-up things below...
packages/charts/src/components/legend/legend_table/legend_table_item.tsx
Show resolved
Hide resolved
Adding a little comment here for future considerations, but not a blocker for this specific PR.
|
Summary
This PR enables users to add some statistics (e.g., avg, min, max, etc.) for their metrics in the legend. This way they can get their insights faster by easily accessing more information within the chart. All statistics are computed client-side considering the entire dataset range selected.
Details
Story to test it: Legend/Tabular data
Implements table view for legend statistics. The table shows up automatically when user chooses any statistic other than
CurrentAndLastValue
for xy charts only.For the charts that don't have the new legend values added, the legacy view is displayed.
Issues
part of #2096
Checklist
:xy
,:partition
):interactions
,:axis
)closes #123
,fixes #123
)packages/charts/src/index.ts
light
anddark
themes