sadpandajoe commented on code in PR #44147:
URL: https://github.com/apache/superset/pull/44147#discussion_r4175704215


##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts:
##########
@@ -600,8 +706,10 @@ export default function transformProps(
         legendOrientation,
         showLegend,
         theme,
-        false,
+        false, // zoomable — Pie charts do not use the zoom control
         legendState,
+        undefined, // padding — Pie passes width instead
+        Math.max(0, Math.min(width - 50, 250)), // horizontalLegendWidth: cap 
at 250px so long names don't consume the entire row

Review Comment:
   The new 250px cap makes the rendered legend much narrower, but 
`resolveLegendLayout` still reserves space using the full names: an 800×600 
Top/List pie with ten names measuring 1,000px reserves 236px instead of the 
capped layout's 116px, leaving 120px unused and unnecessarily shrinking the 
pie. Could the same text-width cap feed both the layout resolver and these 
legend options?



-- 
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]

Reply via email to