Skip to content

[ES|QL] [Lens] Display a keyword with the correct format in a metric visualization#218233

Merged
andrimal merged 7 commits intoelastic:mainfrom
andrimal:fix/203526
Apr 23, 2025
Merged

[ES|QL] [Lens] Display a keyword with the correct format in a metric visualization#218233
andrimal merged 7 commits intoelastic:mainfrom
andrimal:fix/203526

Conversation

@andrimal
Copy link
Copy Markdown
Contributor

@andrimal andrimal commented Apr 15, 2025

Summary

Fix #203526

  • Example 1: Before the fix, the value was formatted as a number (screenshot 1). After the fix, the value remains a string (screenshot 2).
Screenshot 2025-04-15 at 1 26 26 PM Screenshot 2025-04-15 at 1 29 37 PM
  • Example 2: Before the fix (screenshot 3) and after the fix (screenshot 4)
Screenshot 2025-04-16 at 2 18 23 PM Screenshot 2025-04-16 at 2 17 26 PM

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@andrimal andrimal added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:version Backport to applied version labels v8.19.0 v8.18.1 v9.0.1 labels Apr 15, 2025
(type: string) =>
({ width, height, color }: { width: number; height: number; color: string }) =>
<EuiIcon type={type} fill={color} style={{ width, height }} />;
<EuiIcon type={type} fill={color} css={{ width, height }} />;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an automatic eslint fix.

@dej611 dej611 added release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels Apr 16, 2025
@andrimal andrimal marked this pull request as ready for review April 16, 2025 16:01
@andrimal andrimal requested a review from a team as a code owner April 16, 2025 16:01
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

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
expressionMetricVis 5.1KB 5.2KB +116.0B

History

@andrimal andrimal merged commit 3c09bc4 into elastic:main Apr 23, 2025
9 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0

https://github.com/elastic/kibana/actions/runs/14615132102

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 23, 2025
…visualization (elastic#218233)

## Summary

Fix elastic#203526

- Example 1: Before the fix, the value was formatted as a number
(screenshot 1). After the fix, the value remains a string (screenshot
2).

<img width="1506" alt="Screenshot 2025-04-15 at 1 26 26 PM"
src="https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521"
/>
<img width="1495" alt="Screenshot 2025-04-15 at 1 29 37 PM"
src="https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8"
/>

- Example 2: Before the fix (screenshot 3) and after the fix (screenshot
4)
<img width="862" alt="Screenshot 2025-04-16 at 2 18 23 PM"
src="https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906"
/>
<img width="849" alt="Screenshot 2025-04-16 at 2 17 26 PM"
src="https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7"
/>

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 3c09bc4)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 23, 2025
…visualization (elastic#218233)

## Summary

Fix elastic#203526

- Example 1: Before the fix, the value was formatted as a number
(screenshot 1). After the fix, the value remains a string (screenshot
2).

<img width="1506" alt="Screenshot 2025-04-15 at 1 26 26 PM"
src="https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521"
/>
<img width="1495" alt="Screenshot 2025-04-15 at 1 29 37 PM"
src="https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8"
/>

- Example 2: Before the fix (screenshot 3) and after the fix (screenshot
4)
<img width="862" alt="Screenshot 2025-04-16 at 2 18 23 PM"
src="https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906"
/>
<img width="849" alt="Screenshot 2025-04-16 at 2 17 26 PM"
src="https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7"
/>

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 3c09bc4)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 23, 2025
…visualization (elastic#218233)

## Summary

Fix elastic#203526

- Example 1: Before the fix, the value was formatted as a number
(screenshot 1). After the fix, the value remains a string (screenshot
2).

<img width="1506" alt="Screenshot 2025-04-15 at 1 26 26 PM"
src="https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521"
/>
<img width="1495" alt="Screenshot 2025-04-15 at 1 29 37 PM"
src="https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8"
/>

- Example 2: Before the fix (screenshot 3) and after the fix (screenshot
4)
<img width="862" alt="Screenshot 2025-04-16 at 2 18 23 PM"
src="https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906"
/>
<img width="849" alt="Screenshot 2025-04-16 at 2 17 26 PM"
src="https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7"
/>

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 3c09bc4)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.18
8.19
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 23, 2025
…etric visualization (#218233) (#218934)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ES|QL] [Lens] Display a keyword with the correct format in a metric
visualization (#218233)](#218233)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Andreana
Malama","email":"72010092+andrimal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-23T09:47:56Z","message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization","number":218233,"url":"https://github.com/elastic/kibana/pull/218233","mergeCommit":{"message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218233","number":218233,"mergeCommit":{"message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Andreana Malama <72010092+andrimal@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Apr 23, 2025
…metric visualization (#218233) (#218933)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ES|QL] [Lens] Display a keyword with the correct format in a metric
visualization (#218233)](#218233)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Andreana
Malama","email":"72010092+andrimal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-23T09:47:56Z","message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization","number":218233,"url":"https://github.com/elastic/kibana/pull/218233","mergeCommit":{"message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218233","number":218233,"mergeCommit":{"message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Andreana Malama <72010092+andrimal@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Apr 23, 2025
…metric visualization (#218233) (#218932)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ES|QL] [Lens] Display a keyword with the correct format in a metric
visualization (#218233)](#218233)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Andreana
Malama","email":"72010092+andrimal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-23T09:47:56Z","message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization","number":218233,"url":"https://github.com/elastic/kibana/pull/218233","mergeCommit":{"message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218233","number":218233,"mergeCommit":{"message":"[ES|QL]
[Lens] Display a keyword with the correct format in a metric
visualization (#218233)\n\n## Summary\n\nFix #203526 \n\n- Example 1:
Before the fix, the value was formatted as a number\n(screenshot 1).
After the fix, the value remains a string (screenshot\n2).\n\n<img
width=\"1506\" alt=\"Screenshot 2025-04-15 at 1 26
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521\"\n/>\n<img
width=\"1495\" alt=\"Screenshot 2025-04-15 at 1 29
37 PM\"\nsrc=\"https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8\"\n/>\n\n-
Example 2: Before the fix (screenshot 3) and after the fix
(screenshot\n4)\n<img width=\"862\" alt=\"Screenshot 2025-04-16 at 2 18
23 PM\"\nsrc=\"https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906\"\n/>\n<img
width=\"849\" alt=\"Screenshot 2025-04-16 at 2 17
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7\"\n/>\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c09bc4609fbab8d5228b19812cf31a77f9626ff"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Andreana Malama <72010092+andrimal@users.noreply.github.com>
dej611 added a commit to dej611/kibana that referenced this pull request Apr 30, 2025
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…visualization (elastic#218233)

## Summary

Fix elastic#203526 

- Example 1: Before the fix, the value was formatted as a number
(screenshot 1). After the fix, the value remains a string (screenshot
2).

<img width="1506" alt="Screenshot 2025-04-15 at 1 26 26 PM"
src="https://github.com/user-attachments/assets/74da3971-b4df-4602-a477-5f83ddade521"
/>
<img width="1495" alt="Screenshot 2025-04-15 at 1 29 37 PM"
src="https://github.com/user-attachments/assets/6c0cb412-95c0-47de-9765-4c3eae4e2fa8"
/>

- Example 2: Before the fix (screenshot 3) and after the fix (screenshot
4)
<img width="862" alt="Screenshot 2025-04-16 at 2 18 23 PM"
src="https://github.com/user-attachments/assets/9eafe58f-edd7-43d6-97d1-2638f2f3e906"
/>
<img width="849" alt="Screenshot 2025-04-16 at 2 17 26 PM"
src="https://github.com/user-attachments/assets/5a912305-22c2-43b2-a3b8-a412310785a7"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Lens release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.18.1 v8.19.0 v9.0.1 v9.1.0

4 participants