eschutho commented on code in PR #32030:
URL: https://github.com/apache/superset/pull/32030#discussion_r1940060631


##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -443,13 +444,30 @@ export function getLegendProps(
       borderColor: theme.colors.grayscale.base,
     },
   };
+  const MIN_LEGEND_WIDTH = 0;
+  const MARGIN_GUTTER = 45;
+  const getLegendWidth = (paddingWidth: number) =>
+    Math.max(paddingWidth - MARGIN_GUTTER, MIN_LEGEND_WIDTH);

Review Comment:
   Yeah, I tried out a few different min widths, but the problem is that when 
applying a min width, then we have the same overlap issue with the chart. So 
either way, there will be a UI issue, and a larger padding will need to be set. 
Someone needs to explicitly set a 0 padding in order for this to apply. If you 
think having the overlap is better than a readable legend, we can def do that. 



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to