You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/13 06:53:46 UTC

[GitHub] [echarts] wenhai974 commented on issue #16875: [Bug] Grid.containLabel is set to true, but axisLabel is still truncated

wenhai974 commented on issue #16875:
URL: https://github.com/apache/echarts/issues/16875#issuecomment-1097625214

   > This is caused by a bug in the logic of `containLabel` here:
   > 
   > https://github.com/apache/echarts/blob/2a67f86e6edaba14fe33c33ca28c7c18d56c0aed/src/coord/cartesian/Grid.ts#L188-L204
   > 
   > 
   > Echarts is adjusting the grid's width by the width of yAxis label and grid's height by the height of xAxis label. But the overflow in width caused by xAxis label is not considered.
   > This is a logic bug which fails to achieve the goal of option `containLabel`, but can be solved quite easily by adjusting `grid.width`.
   > @plainheart @pissang Do we need a PR to solve this? I can submit one if needed.
   
   Thank you! 
   If it's just a custom chart, adjusting grid.width will do the trick.
   However, in real application scenarios, the length and number of lable on the X-axis may not be determined, so adjusting **grid.width** is not elegant.
   And in order for all data not to be truncated, there will be too much white space on the right side of the grid.


-- 
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: commits-unsubscribe@echarts.apache.org

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


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