fix(Echarts): Echarts Legend Scroll fix (#33779)

Co-authored-by: Amaan Nawab <nelsondrew07@gmail.com>
This commit is contained in:
amaannawab923
2025-06-16 21:14:52 +05:30
committed by GitHub
parent 7b6885a020
commit 9df990c2d1
5 changed files with 28 additions and 0 deletions

View File

@@ -122,6 +122,7 @@ export default function transformProps(
theme,
inContextMenu,
emitCrossFilters,
legendIndex,
} = chartProps;
let focusedSeries: string | null = null;
@@ -467,6 +468,7 @@ export default function transformProps(
setControlValue = () => {},
onContextMenu,
onLegendStateChanged,
onLegendScroll,
} = hooks;
const addYAxisLabelOffset = !!yAxisTitle;
@@ -642,6 +644,7 @@ export default function transformProps(
legendState,
padding,
),
scrollDataIndex: legendIndex || 0,
data: legendData as string[],
},
series: dedupSeries(reorderForecastSeries(series) as SeriesOption[]),
@@ -710,5 +713,6 @@ export default function transformProps(
},
refs,
coltypeMapping: dataTypes,
onLegendScroll,
};
}