-
Notifications
You must be signed in to change notification settings - Fork 122
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(Metric): improve default font-sizing #2548
fix(Metric): improve default font-sizing #2548
Conversation
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.
Really nice code structure improvements!
Overall, I like the new behaviors but I had a few questions below. I think we could merge this with the Custom
fixes and save the others for later improvements.
packages/charts/src/chart_types/metric/renderer/dom/text_measurements.tsx
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/metric/renderer/dom/text_measurements.tsx
Show resolved
Hide resolved
packages/charts/src/chart_types/metric/renderer/dom/text_measurements.tsx
Show resolved
Hide resolved
packages/charts/src/chart_types/bullet_graph/renderer/canvas/index.tsx
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.
New changes LGTM. The failing images looks minor related to the appended value string.
buildkite update screenshots |
Summary
This feature adds the snapping option for metric value font size. This behaviour will apply the breaking point font size that is big enough to completely render the
value
without any truncation/overflow.fix #2543
Screen.Recording.2024-10-14.at.16.42.10.mp4
Details
I've refactored a bit the metric text code, extracting the various functions and moving the processing/measurement logic in separate files.
Issues
Checklist
:xy
,:partition
)closes #123
,fixes #123
)packages/charts/src/index.ts
light
anddark
themes