Skip to content

Commit e9e9027

Browse files
[8.19] [Lens] [ES|QL] Tagcloud missing from types (#219916) (#220193)
# Backport This will backport the following commits from `main` to `8.19`: - [[Lens] [ES|QL] Tagcloud missing from types (#219916)](#219916) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Stratoula Kalafateli","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-06T06:44:05Z","message":"[Lens] [ES|QL] Tagcloud missing from types (#219916)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/219905\n\nWe are using the `mapVisToChartType` to return the lens visualization\ntype. If it is not in the list then it will return undefined\n\n```\nconst mapVisToChartType = (visualizationType: string) => {\n if (isLensVisualizationType(visualizationType)) {\n return lensTypesToChartTypes[visualizationType];\n }\n```\n\nThis was a suggestion from the viz team but because it is not used\nacross the Lens code we missed the tagcloud. Using it across Lens will\nensure that this won't happen again\nhttps://github.com//issues/219917.\n\nThis PR just adds the tagclouds in the list to ensure that the bug is\nfixed.\n\n\n\n![meow](https://github.com/user-attachments/assets/1aeb96ac-c41b-4d14-9654-30573b548878)","sha":"e1038832a7ff87b19058bf0112271db68b5af0ad","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[Lens] [ES|QL] Tagcloud missing from types","number":219916,"url":"https://github.com/elastic/kibana/pull/219916","mergeCommit":{"message":"[Lens] [ES|QL] Tagcloud missing from types (#219916)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/219905\n\nWe are using the `mapVisToChartType` to return the lens visualization\ntype. If it is not in the list then it will return undefined\n\n```\nconst mapVisToChartType = (visualizationType: string) => {\n if (isLensVisualizationType(visualizationType)) {\n return lensTypesToChartTypes[visualizationType];\n }\n```\n\nThis was a suggestion from the viz team but because it is not used\nacross the Lens code we missed the tagcloud. Using it across Lens will\nensure that this won't happen again\nhttps://github.com//issues/219917.\n\nThis PR just adds the tagclouds in the list to ensure that the bug is\nfixed.\n\n\n\n![meow](https://github.com/user-attachments/assets/1aeb96ac-c41b-4d14-9654-30573b548878)","sha":"e1038832a7ff87b19058bf0112271db68b5af0ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219916","number":219916,"mergeCommit":{"message":"[Lens] [ES|QL] Tagcloud missing from types (#219916)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/219905\n\nWe are using the `mapVisToChartType` to return the lens visualization\ntype. If it is not in the list then it will return undefined\n\n```\nconst mapVisToChartType = (visualizationType: string) => {\n if (isLensVisualizationType(visualizationType)) {\n return lensTypesToChartTypes[visualizationType];\n }\n```\n\nThis was a suggestion from the viz team but because it is not used\nacross the Lens code we missed the tagcloud. Using it across Lens will\nensure that this won't happen again\nhttps://github.com//issues/219917.\n\nThis PR just adds the tagclouds in the list to ensure that the bug is\nfixed.\n\n\n\n![meow](https://github.com/user-attachments/assets/1aeb96ac-c41b-4d14-9654-30573b548878)","sha":"e1038832a7ff87b19058bf0112271db68b5af0ad"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Stratoula Kalafateli <[email protected]>
1 parent d28747d commit e9e9027

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/platform/packages/shared/kbn-visualization-utils/src/map_vis_to_chart_type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const lensTypesToChartTypes: LensToChartMap = {
2121
[LensVisualizationType.Heatmap]: ChartType.Heatmap,
2222
[LensVisualizationType.Gauge]: ChartType.Gauge,
2323
[LensVisualizationType.Datatable]: ChartType.Table,
24+
[LensVisualizationType.Tagcloud]: ChartType.Tagcloud,
2425
};
2526
function isLensVisualizationType(value: string): value is LensVisualizationType {
2627
return Object.values(LensVisualizationType).includes(value as LensVisualizationType);

src/platform/packages/shared/kbn-visualization-utils/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ export enum LensVisualizationType {
6969
Gauge = 'lnsGauge',
7070
Datatable = 'lnsDatatable',
7171
LegacyMetric = 'lnsLegacyMetric',
72+
Tagcloud = 'lnsTagcloud',
7273
}

0 commit comments

Comments
 (0)