Ovilia commented on issue #11944: Axis label being outside of the canvas
URL: 
https://github.com/apache/incubator-echarts/issues/11944#issuecomment-593234336
 
 
   I found that there is an option 
[xAxis.data.textStyle.align](https://echarts.apache.org/zh/option.html#xAxis.data.textStyle.align)
 that can set the align of a single axis data label. So there are two options:
   
   1. For users who have such requirement, they can set the align value of the 
last element to be `'right'`:
   ```
       xAxis: {
           data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', {
               value: 'Satxxxxxxxxxxxxxxxxxxxxxxxy',
               textStyle: {
                   align: 'right'
               }
           }],
           axisLabel: {
               interval: 4,
               showMinLabel: true,
               showMaxLabel: true,
               align: 'left'
           }
       },
   ```
   
   2. We change the source code and set the last label to be `'right'` for all 
cases, or if the last label is larger than the given space.
   
   Apparently, setting the last label to be `'right'` for all cases is a bad 
solution for simple cases like:
   <img width="830" alt="屏幕快照 2020-03-02 13 52 09" 
src="https://user-images.githubusercontent.com/779050/75649357-d3190d80-5c8d-11ea-989b-8d9b57939360.png";>
   
   
   I would suggest that we remain the logic simple and let the user decide 
whether they need to align the last label to right.  

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to