vhogberg commented on PR #39414:
URL: https://github.com/apache/superset/pull/39414#issuecomment-4706270854

   > Thanks for digging into this @vhogberg! Two things before I'm comfortable 
merging.
   > 
   > For Right and Bottom you're doing += offsetX/+= offsetY, which pushes the 
center toward the legend rather than away from it - I think those want to be 
-=, maybe?. Pie does the same calc inverted at Pie/transformProps.ts (right 
padding shifts left, bottom shifts up).
   > 
   > More broadly, could we lean on the existing getChartPadding in 
utils/series.ts? Pie and Funnel already use it to turn legendMargin + 
legendOrientation into per-side padding, and it'd save the * 50 magic number 
here.
   > 
   > Curious if that fits the radar center cleanly. A small unit test in the 
existing Radar/transformProps.test.ts covering each orientation would lock the 
direction down too. Thoughts?
   
   Thanks for the input! The += was a mistake on my part, good spot. I went 
with your suggestion to use getChartPadding instead though, and it works, good 
suggestion. Added some tests now too.


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