Copilot commented on code in PR #36077:
URL: https://github.com/apache/superset/pull/36077#discussion_r2524490994
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -482,8 +482,14 @@ export function getLegendProps(
break;
case LegendOrientation.Bottom:
legend.bottom = 0;
+ if (padding?.left) {
+ legend.left = padding.left;
+ }
break;
case LegendOrientation.Top:
+ if (padding?.left) {
+ legend.left = padding.left;
+ }
Review Comment:
Missing `break` statement in the `LegendOrientation.Top` case. This causes
the code to fall through to the `default` case, which will overwrite the
`legend.left` property that was just set with the padding. This means the Top
orientation will always get `legend.top = 0` and `legend.right` set,
potentially overriding the intended `legend.left` positioning.
Add a `break;` statement after line 492 to prevent fall-through to the
default case.
```suggestion
}
break;
```
--
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]