feat(theme): set default labelOptions.widthLimit in themes and update metric.titleWeight default to 500#2802
Merged
maryam-saeidi merged 6 commits intoelastic:mainfrom Mar 6, 2026
Conversation
Add widthLimit: 250 to built-in themes and make legend labelOptions.maxLines/widthLimit required. Made-with: Cursor
Use medium font-weight (500) instead of 'bold' for metric titles across built-in themes. Made-with: Cursor
Member
Author
|
buildkite update vrt |
Member
Author
|
buildkite build this |
Member
Author
|
buildkite update vrt |
e2e/screenshots/all.test.ts-snapshots/baselines/metric-alpha/array-of-values-chrome-linux.png
Show resolved
Hide resolved
mariairiartef
approved these changes
Mar 6, 2026
Contributor
mariairiartef
left a comment
There was a problem hiding this comment.
LGTM! Left some comments
maryam-saeidi
commented
Mar 6, 2026
maryam-saeidi
commented
Mar 6, 2026
Remove unnecessary defaultValue comments
8 tasks
nickofthyme
pushed a commit
that referenced
this pull request
Mar 31, 2026
# [71.4.0](v71.3.0...v71.4.0) (2026-03-31) ### Bug Fixes * **legend:** avoid re-rendering ([#2646](#2646)) ([0ca3289](0ca3289)) * **legend:** keep legend values visible when hiding series in list layout ([#2807](#2807)) ([c5089f5](c5089f5)) ### Features * **highlight:** Add support to configure dimmed (unhighlight) colors for Bar, Partition, Waffle and Flame charts ([#2774](#2774)) ([b39e24d](b39e24d)), closes [#ECF1F9](https://github.com/elastic/elastic-charts/issues/ECF1F9) [#384861](https://github.com/elastic/elastic-charts/issues/384861) * **metric:** Add ability to vertically align the metrics values to the middle of the chart ([#2783](#2783)) ([54ca7cb](54ca7cb)) * **theme:** set default labelOptions.widthLimit in themes and update metric.titleWeight default to 500 ([#2802](#2802)) ([fbb8834](fbb8834))
maryam-saeidi
added a commit
to elastic/kibana
that referenced
this pull request
Apr 2, 2026
## Summary This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@elastic/charts](https://github.com/elastic/elastic-charts) | dependencies | minor | [`71.3.0` -> `71.4.0`](elastic/elastic-charts@v71.3.0...v71.4.0) | ### Release Notes # [71.4.0](elastic/elastic-charts@v71.3.0...v71.4.0) (2026-03-31) ### Bug Fixes * **legend:** avoid re-rendering ([#2646](elastic/elastic-charts#2646)) ([0ca3289](elastic/elastic-charts@0ca3289)) * **legend:** keep legend values visible when hiding series in list layout ([#2807](elastic/elastic-charts#2807)) ([c5089f5](elastic/elastic-charts@c5089f5)) ### Features * **highlight:** Add support to configure dimmed (unhighlight) colors for Bar, Partition, Waffle and Flame charts ([#2774](elastic/elastic-charts#2774)) ([b39e24d](elastic/elastic-charts@b39e24d)), closes [#ECF1F9](https://github.com/elastic/elastic-charts/issues/ECF1F9) [#384861](https://github.com/elastic/elastic-charts/issues/384861) * **metric:** Add ability to vertically align the metrics values to the middle of the chart ([#2783](elastic/elastic-charts#2783)) ([54ca7cb](elastic/elastic-charts@54ca7cb)) * **theme:** set default labelOptions.widthLimit in themes and update metric.titleWeight default to 500 ([#2802](elastic/elastic-charts#2802)) ([fbb8834](elastic/elastic-charts@fbb8834)) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Abdul Zahid <awahab07@yahoo.com>
paulinashakirova
pushed a commit
to paulinashakirova/kibana
that referenced
this pull request
Apr 2, 2026
## Summary This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@elastic/charts](https://github.com/elastic/elastic-charts) | dependencies | minor | [`71.3.0` -> `71.4.0`](elastic/elastic-charts@v71.3.0...v71.4.0) | ### Release Notes # [71.4.0](elastic/elastic-charts@v71.3.0...v71.4.0) (2026-03-31) ### Bug Fixes * **legend:** avoid re-rendering ([elastic#2646](elastic/elastic-charts#2646)) ([0ca3289](elastic/elastic-charts@0ca3289)) * **legend:** keep legend values visible when hiding series in list layout ([elastic#2807](elastic/elastic-charts#2807)) ([c5089f5](elastic/elastic-charts@c5089f5)) ### Features * **highlight:** Add support to configure dimmed (unhighlight) colors for Bar, Partition, Waffle and Flame charts ([elastic#2774](elastic/elastic-charts#2774)) ([b39e24d](elastic/elastic-charts@b39e24d)), closes [#ECF1F9](https://github.com/elastic/elastic-charts/issues/ECF1F9) [#384861](https://github.com/elastic/elastic-charts/issues/384861) * **metric:** Add ability to vertically align the metrics values to the middle of the chart ([elastic#2783](elastic/elastic-charts#2783)) ([54ca7cb](elastic/elastic-charts@54ca7cb)) * **theme:** set default labelOptions.widthLimit in themes and update metric.titleWeight default to 500 ([elastic#2802](elastic/elastic-charts#2802)) ([fbb8834](elastic/elastic-charts@fbb8834)) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Abdul Zahid <awahab07@yahoo.com>
1 task
maryam-saeidi
added a commit
to elastic/kibana
that referenced
this pull request
Apr 7, 2026
…#254941) Closes #252834 ## Summary This PR removes the font-weight configuration in Metric charts and defaults it to **medium**. - [x] TODO: Add another option for the Metric font-weight: medium to the elastic-charts. - elastic/elastic-charts#2792 - elastic/elastic-charts#2802 |State|Screenshot| |---|---| |Before|<img width="1511" height="652" alt="image" src="https://github.com/user-attachments/assets/a82617f9-5c81-4c58-8084-a0ab333b2b16" />| |After|<img width="1509" height="786" alt="image" src="https://github.com/user-attachments/assets/ad7790dd-812a-43c0-b832-602b610d7ca5" />| ### How to test 🧪 - Create two metric chart in main: one with the font weight: Regular and another with default bold font weight - Switch to this branch and make sure that the related metric chart is loaded correctly with the **medium (500)** font weight. - Make a change in the regular font weight metric and save. Now, you should not see the font weight property in the saved object anymore. I also followed the same steps in the Cases, and it worked as expected: |State|Screenshot| |---|---| |Before|<img width="1510" height="804" alt="image" src="https://github.com/user-attachments/assets/1266d92f-8ec0-4199-86e8-c89520f15fa9" />| |After|<img width="1512" height="783" alt="image" src="https://github.com/user-attachments/assets/f1ae0989-4320-456e-a0b4-770a4a1e550e" />| ### Release Note Removed the font-weight parameter for Metric chart titles. Titles now use a consistent default font weight of Medium. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Legend label truncation options now have sensible defaults in all built-in themes.
legend.labelOptions.widthLimitdefaults to 250px (alongsidemaxLines: 1), so consumers don’t need to manually set these values to get consistent legend label truncation behavior.Metric chart titles now default to a medium (500) font weight (instead of bold).
Details
legend.labelOptions.widthLimit: 250to all built-in themes (Light/Dark, Amsterdam, Legacy).LegendLabelOptions.maxLinesandLegendLabelOptions.widthLimitrequired, relying on theme defaults instead of inline component fallbacks.packages/charts/api/charts.api.md) to reflect the required fields.metric.titleWeight: 500instead of 'bold' (Related to [Lens] Remove font-weight configuration from Metric Chart style panel kibana#252834).Issues
Closes #2801
Checklist
:interactions,:axis)closes #123,fixes #123)packages/charts/src/index.tsMade with Cursor