richardfogaca commented on code in PR #38675:
URL: https://github.com/apache/superset/pull/38675#discussion_r2982452352
##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -583,13 +586,59 @@ export default function transformProps(
convertInteger(yAxisTitleMargin) !== 0;
const addXAxisTitleOffset =
!!xAxisTitle && convertInteger(xAxisTitleMargin) !== 0;
+ const baseChartPadding = getPadding(
+ showLegend,
+ legendOrientation,
+ addYAxisTitleOffset,
+ zoomable,
+ legendMargin,
+ addXAxisTitleOffset,
+ yAxisTitlePosition,
+ convertInteger(yAxisTitleMargin),
+ convertInteger(xAxisTitleMargin),
+ );
+ const legendData = series
+ .filter(
+ entry =>
+ extractForecastSeriesContext((entry.name || '') as string).type ===
+ ForecastSeriesEnum.Observation,
+ )
+ .map(entry => entry.name)
+ .filter((name): name is string => Boolean(name))
+ .concat(extractAnnotationLabels(annotationLayers))
+ .sort((a: string, b: string) => {
Review Comment:
I checked that path again and I think entry.name is still the right contract
here. legend.data should match the displayed series names, and keeping entry.id
would reintroduce generated annotation helper ids for event/interval marker
series into the legend. That is also what the regression test is guarding
against.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]