elnipa opened a new issue #14103:
URL: https://github.com/apache/echarts/issues/14103


   ### What problem does this feature solve?
   I am trying to auto calculate margins in a grid depending if a title, 
legend, dataZoom is added on top/bottom/left/right. The result is an amount of 
pixels I want to inset the grid from the position.
   Currently this is only possible by positioning the grid with left/top. But 
this is not working if the grid is positioned relative, e.g. 50% from left. You 
cannot add an additional offset, e.g. "30px" when a dataZoom is added to the 
left yAxis.
   
   The "containLabel" option is of no help here, as it doesn't cover dataZooms, 
titles, legends etc.
   
   ### What does the proposed API look like?
   Add following options to Grid option:
   
   // Set margin to be 5 (px)
   margin: 5
   // Set the top and bottom margins to be 5 (px), and left and right margins 
to be 10 (px)
   margin: [5, 10]
   // Set each of the four margins seperately
   margin: [
       5,  // up
       10, // right
       5,  // down
       10, // left
   ]
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

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



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

Reply via email to