From 979fe4e9e655b78ec092c77805f4e9567d4bc941 Mon Sep 17 00:00:00 2001 From: sz-p Date: Mon, 23 Dec 2024 16:39:36 +0800 Subject: [PATCH 1/2] fix(legend): symbolRotate for legend is neither inherited nor being set #20562 --- src/component/legend/LegendView.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/component/legend/LegendView.ts b/src/component/legend/LegendView.ts index 9016468240..7d1b34777d 100644 --- a/src/component/legend/LegendView.ts +++ b/src/component/legend/LegendView.ts @@ -404,12 +404,7 @@ class LegendView extends ComponentView { } else { // Use default legend icon policy for most series - const rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') - ? (iconRotate === 'inherit' - ? seriesModel.getData().getVisual('symbolRotate') - : iconRotate - ) - : 0; // No rotation for no icon + const rotate = zrUtil.retrieve2(seriesModel.getData().getVisual('symbolRotate'), iconRotate); itemGroup.add(getDefaultLegendIcon({ itemWidth, itemHeight, From c55256efb6c21746b06b260fc0ea7083980a87e5 Mon Sep 17 00:00:00 2001 From: sz-p Date: Mon, 23 Dec 2024 19:23:11 +0800 Subject: [PATCH 2/2] test(legend): symbolRotate for legend is neither inherited nor being set #20562 --- test/legend-style.html | 160 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 159 insertions(+), 1 deletion(-) diff --git a/test/legend-style.html b/test/legend-style.html index 803dac2ee0..146dae3fb9 100644 --- a/test/legend-style.html +++ b/test/legend-style.html @@ -37,6 +37,10 @@
+
+
+
+
- + + + + + + + +