vandelpavel commented on issue #17902:
URL: https://github.com/apache/echarts/issues/17902#issuecomment-1959516563

   Basically what @zhaolei2013 states is true.
   I had the same problem and I was not able to find a way to retrieve that 
value.
   My workaround is to use the following config:
   
   ```ts
     /** This represents the space dedicated to the YAxis name label which is 
required to avoid it overlapping with the following axis or overflowing outside 
the canvas */
     const SPACE_FOR_Y_AXIS_NAME = 40;
     /** The space reserved for YAxis tick labels before ellipsis. This also 
allows us to define part of the horizontal space occupied by one yYAxis */
     const Y_AXIS_TICK_LABELS_MAX_WIDTH = 40;
     
     const options = {
       yAxis: {
         name: "<axis_name>",
         nameGap: Y_AXIS_TICK_LABELS_MAX_WIDTH,
         nameTextStyle: {
           padding: 4,
         },
         nameLocation: "middle",
         axisLabel: {
           hideOverlap: true,
           overflow: "truncate",
           width: Y_AXIS_TICK_LABELS_MAX_WIDTH,
         },
         // ...
       },
       grid: {
         right: Y_AXIS_TICK_LABELS_MAX_WIDTH + SPACE_FOR_Y_AXIS_NAME,
         left: Y_AXIS_TICK_LABELS_MAX_WIDTH + SPACE_FOR_Y_AXIS_NAME,
         // Natively echarts supports dynamic spacings around the grid based on 
the length of the yaxis ticks
         // unfortunately this only works for a maximum of 2 yaxis and if we 
want to manually handle spaces then we need to disable that feature
         containLabel: false,
         // ...
       },
       // ...
     };
   ```


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