Skip to content

[Lens] Add Primary metric position: 'middle' for Metric chart#260902

Merged
awahab07 merged 2 commits intoelastic:mainfrom
awahab07:234956_Lens_Metric_Allow-Middle-Center-Alignment-for-primary-and-secondary-metrics
Apr 7, 2026
Merged

[Lens] Add Primary metric position: 'middle' for Metric chart#260902
awahab07 merged 2 commits intoelastic:mainfrom
awahab07:234956_Lens_Metric_Allow-Middle-Center-Alignment-for-primary-and-secondary-metrics

Conversation

@awahab07
Copy link
Copy Markdown
Contributor

@awahab07 awahab07 commented Apr 2, 2026

Closes #234956

Summary

  • Adds a Middle option to Lens Metric → Style → Primary metric → Position (Top | Middle | Bottom).
  • Enables vertically centered primary metric positioning using elastic-charts support from elastic/elastic-charts#2783.

Testing

  • Open Lens → Metric visualization.
  • Open Style → Primary metric → Position and verify Top / Middle / Bottom are available.
  • Select Middle and confirm the primary value is vertically centered.
  • Add the visualization to a dashboard, edit the panel, change Position again, then Apply and close.
image
235956_Metric-chart-middle-vertical-position.mov

@awahab07 awahab07 added release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// backport:skip This PR does not require backporting labels Apr 2, 2026
@awahab07 awahab07 marked this pull request as ready for review April 2, 2026 11:32
@awahab07 awahab07 requested a review from a team as a code owner April 2, 2026 11:32
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

Copy link
Copy Markdown
Contributor

@mariairiartef mariairiartef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and LGTM 💖

@awahab07 awahab07 enabled auto-merge (squash) April 7, 2026 09:44
@awahab07 awahab07 merged commit 93bc738 into elastic:main Apr 7, 2026
18 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #209 / aiops log rate analysis with 'kibana_sample_data_logstsdb' kibana sample data logs displays index details

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 2.0MB 2.0MB +109.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
expressionMetricVis 17.4KB 17.4KB +10.0B

History

kelvtanv pushed a commit to kelvtanv/kibana that referenced this pull request Apr 7, 2026
…c#260902)

- Adds a **Middle** option to Lens Metric → Style → Primary metric →
Position (**Top | Middle | Bottom**).
- Enables vertically centered primary metric positioning using
elastic-charts support from
[elastic/elastic-charts#2783](elastic/elastic-charts#2783).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens][Metric] Allow Middle Center Alignment for primary and secondary metrics

4 participants