You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/01/09 14:23:22 UTC

[GitHub] xerxes3117 opened a new issue #9723: xAxis rotate unhides the axis labels only with small window width

xerxes3117 opened a new issue #9723: xAxis rotate unhides the axis labels only with small window width
URL: https://github.com/apache/incubator-echarts/issues/9723
 
 
   ### Version & Environment [Version & Environment]
   
   - ECharts version [ECharts version]: 4.0
   - Browser version [browser type and version]: chrome
   - OS Version [operating system type and version]: windows 10
   
   ### One-line summary [Question Brief]
   I'm trying to rotate the labels to unhide the x axis labels. I want to rotate the labels based on some conditions so I do this after initially setting the options (using setTimeout). The labels rotate works but the issue is that labels are not unhidden. Additionally, after some tinkering I found a weird behavior. This issue is not present if the container window is small.
   
   ### Expected behaviour [expected result]
   Axis labels should be unhidden in both cases.
   
   ### ECharts option [ECharts configuration item] 
   ```
   option = {
       xAxis: {
           type: 'category',
           axisTick: {
             alignWithLabel: true  
           },
           data: [
             'Campaign 1'
           , 'Campaign 2'
           , 'Campaign 3'
           , 'Campaign 4'
           , 'Campaign 5'
           , 'Campaign 6'
           , 'Campaign 7'
           , 'Campaign 8'
           , 'Campaign 9'
           , 'Campaign 10'
           ],
       },
       yAxis: {
           type: 'value'
       },
       series: [{
           data: [820, 932, 901, 934, 1290, 1330, 1320, 1320, 732, 920, ],
           type: 'line'
       }]
   };
   
   setTimeout(function () {
             
       myChart.setOption({
           xAxis: {
               axisLabel: {
                    rotate: '35'   
               }
           }
       });
       
   });
   ```
   ### Other comments [Other Information]
   Attaching the images for both cases:
   **Case 1 : When window size is large**
   ![untitled](https://user-images.githubusercontent.com/24941920/50905133-19872980-1448-11e9-95dc-8eb5220489e0.jpg)
   
   
   **Case 2 : When window size is small**
   ![untitled1](https://user-images.githubusercontent.com/24941920/50905142-1e4bdd80-1448-11e9-9d39-d98d912eb222.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:
users@infra.apache.org


With regards,
Apache Git Services

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