leekbillow opened a new issue, #16931:
URL: https://github.com/apache/echarts/issues/16931

   ### What problem does this feature solve?
   
   希望x轴标签间距的自动计算可以把宽度设置考虑进去,否则即使`xAxis.axisLabel.width`设置得很小,依然会有标签不显示浪费空间。
   It is hoped that the automatic calculation of the X-axis label spacing takes 
into account the width Settings, otherwise even if `xAxis.axisLabel.width` is 
set very small, there will still be labels that do not display wasted space.
   ```js
   option = {
     xAxis: {
       type: 'category',
       data: [
         '标签标签标签标签标签标签标签',
         '标签标签标签标签标签',
         '标签标签标签',
         '标签标签标签标签标签',
         '标签标签标签',
         '标签标签标签标签标签标签标签标签标签标签标签',
         '标签标签',
         '标签标签标签标签'
       ],
       axisLabel: {
         width: 50,
         overflow: 'truncate',
         // interval: 0
       }
     },
     // dataZoom: {
     yAxis: {
       type: 'value'
     },
     series: [
       {
         type: 'bar',
         data: [120, 200, 150, 80, 70, 110, 130, 200]
       }
     ]
   };
   ```
   
![image](https://user-images.githubusercontent.com/43409097/164588677-9e874c4b-6332-4fe7-8693-acaa93b3195e.png)
   
   
   ### What does the proposed API look like?
   
   `xAxis.axisLabel.interval='auto'`


-- 
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-unsubscr...@echarts.apache.org.apache.org

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