Skip to content

Commit b9fd285

Browse files
[8.15] [Lens] Heatmap expression support legend truncation (#195928) (#196016)
# Backport This will backport the following commits from `main` to `8.15`: - [[Lens] Heatmap expression support legend truncation (#195928)](#195928) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Linghao Su","email":"linghao.su@daocloud.io"},"sourceCommit":{"committedDate":"2024-10-12T17:37:32Z","message":"[Lens] Heatmap expression support legend truncation (#195928)\n\nFixes #95521 where heatmap legend label truncation was not working.","sha":"ee5ce4fbca12c8e0cf615381b36eb184bb79bd71","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Heatmap","release_note:fix","Team:Visualizations","Feature:Lens","💝community","v9.0.0","backport:prev-major"],"title":"[Lens] Heatmap expression support legend truncation","number":195928,"url":"https://github.com/elastic/kibana/pull/195928","mergeCommit":{"message":"[Lens] Heatmap expression support legend truncation (#195928)\n\nFixes #95521 where heatmap legend label truncation was not working.","sha":"ee5ce4fbca12c8e0cf615381b36eb184bb79bd71"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195928","number":195928,"mergeCommit":{"message":"[Lens] Heatmap expression support legend truncation (#195928)\n\nFixes #95521 where heatmap legend label truncation was not working.","sha":"ee5ce4fbca12c8e0cf615381b36eb184bb79bd71"}}]}] BACKPORT--> Co-authored-by: Linghao Su <linghao.su@daocloud.io>
1 parent b914a62 commit b9fd285

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

x-pack/plugins/lens/public/visualizations/heatmap/visualization.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ describe('heatmap', () => {
437437
function: LEGEND_FUNCTION,
438438
arguments: {
439439
isVisible: [true],
440-
position: [Position.Right],
440+
maxLines: [1],
441+
position: ['right'],
442+
shouldTruncate: [true],
441443
},
442444
},
443445
],

x-pack/plugins/lens/public/visualizations/heatmap/visualization.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ export const getHeatmapVisualization = ({
319319
isVisible: state.legend.isVisible,
320320
position: state.legend.position,
321321
legendSize: state.legend.legendSize,
322+
shouldTruncate: state.legend.shouldTruncate,
323+
maxLines: state.legend.maxLines,
322324
}
323325
);
324326

0 commit comments

Comments
 (0)