-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix: (Legend values) percentage formatter should be distict from tick formatter #2474
Conversation
440bb1b
to
e405c71
Compare
245db6f
to
2b3dd1e
Compare
2b3dd1e
to
b02a4dd
Compare
75f9b69
to
d83cf67
Compare
buildkite update screenshots |
...-tabular-data/should-correctly-display-current-and-last-value-median-values-chrome-linux.png
Outdated
Show resolved
Hide resolved
...ries/legend-tabular-data/should-correctly-display-long-copy-dataset-dataset-chrome-linux.png
Outdated
Show resolved
Hide resolved
...s/legend-stories/legend-tabular-data/should-correctly-display-median-values-chrome-linux.png
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.
Change look good!
It kinda feels to me that we are in need of a some type of separate legendValueFormatter
instead of just relying on the tickFormat
for everything. This way we could let the user handle the percent and null cases directly.
Similar to how we have a labelFormat
option just to format the axis label values apart from the tooltip values, see demo here.
No changes required, just commenting for future discussion.
packages/charts/src/chart_types/xy_chart/state/utils/get_legend_values.ts
Show resolved
Hide resolved
packages/charts/src/chart_types/xy_chart/state/utils/get_legend_values.ts
Show resolved
Hide resolved
...es/legend-tabular-data/should-correctly-display-null-values-dataset-dataset-chrome-linux.png
Outdated
Show resolved
Hide resolved
I am gonna go ahead and merge it so I can start working on upgrading it in Kibana |
## [66.0.5](v66.0.4...v66.0.5) (2024-07-01) ### Bug Fixes * (Legend values) percentage formatter should be distict from tick formatter ([#2474](#2474)) ([b5bd998](b5bd998))
Summary
Fixes a few small issues for legend values:
MB
as a suffix, unnecessary scroll appears. That's because we calculate the width of each cell approximately and we underestimated. I corrected it by changing the width to 8.5 for each letter.I changed one of the tests to make sure we test at least one stacked chart.