Pancho2wang commented on issue #7007: 
横坐标类目轴,data中的第一个和第二个字符串较长,axisLabel.interval设置成0,横坐标最左边的label不显示。
URL: 
https://github.com/apache/incubator-echarts/issues/7007#issuecomment-444012543
 
 
   版本4.2.0-rc, 同样遇到这个问题。
   问题:设置了backgroundColor: 'red', 
观察了下,不管fontSize设置为多小,这个label宽度都不变,前后两个label则不显示。而直接设置width也没用。
   解决方法如下:
        
使用rich,重新设置fontSize和width,使label的width总和小于x轴的长,如果还是显示不出来,则尽量设置width小一点没关系,文字都会显示出来。
           axisLabel: {
               interval: 0,
               color: '#fff',
               backgroundColor: 'red',
               formatter: (value, index) => {
                 return '{a|' + value + '}'
               },
               rich: {
                 a: {
                   fontSize: 10,
                   width: 20
                 }
               }
             }
   
   
![default](https://user-images.githubusercontent.com/6365417/49428489-28dbdd00-f7e1-11e8-8ad7-330ba372cc42.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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