SBIN2010 commented on code in PR #45172:
URL: https://github.com/apache/superset/pull/45172#discussion_r4249755294
##########
superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx:
##########
@@ -36,8 +36,17 @@ import { legendSection } from '../controls';
const { labelType, numberFormat, showLabels, defaultTooltipLabel } =
DEFAULT_FORM_DATA;
-const funnelLegendSection = [...legendSection];
-funnelLegendSection.splice(2, 1);
+// Funnel keeps legend type and drops orientation; the row is matched by name
+// so inserting another legend control does not remove the wrong one.
+const funnelLegendSection = legendSection.filter(row => {
+ const [control] = row;
+ return (
+ !control ||
+ typeof control !== 'object' ||
+ !('name' in control) ||
+ control.name !== 'legendOrientation'
Review Comment:
Good point. Corrected in b409b04
--
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]