You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/12/03 11:24:54 UTC

[GitHub] [incubator-echarts] 100pah opened a new issue #11773: `containLabel` do not work on the horizontal axis label

100pah opened a new issue #11773: `containLabel` do not work on the horizontal axis label
URL: https://github.com/apache/incubator-echarts/issues/11773
 
 
   ### Version
   4.5.0
   
   ### Steps to reproduce
   ```js
   
   var dd =  new Date();
   var oneDay = 3600 * 24 * 1000 * 1000;
   var data = [];
   for (var i = 0; i < 20; i  ) {
       data.push([
           dd, i % 3 ? 10 : 20
       ]);
       dd  = oneDay;
   }
   
   var option = {
       backgroundColor: '#fff',
       toolbox: {
           feature: {
               brush: {}
           }
       },
       grid: {
           containLabel: true,
           right: 5
       },
       xAxis: {
           type: 'time',
           axisLabel: {
               formatter: function (value) {
                   return echarts.format.formatTime('yyyy-MM-dd', value);
               }
           }
       },
       yAxis: {},
       series: {
           type: 'line',
           data: data
       }
   };
   ```
   
   ### What is expected?
   Do not cut the right label.
   
   ### What is actually happening?
   The right most label is cut.
   
   ![image](https://user-images.githubusercontent.com/1956569/70047199-8aa47200-1602-11ea-9b83-2c993688d948.png)
   
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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