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 2018/08/10 03:56:24 UTC

[GitHub] Somnusochi opened a new issue #8850: 柱形图显示异常

Somnusochi opened a new issue #8850: 柱形图显示异常
URL: https://github.com/apache/incubator-echarts/issues/8850
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### 柱形图显示异常
   使用柱状图对比时若没有设置`xAxis`的`max`和`min`值柱状图上面的文字会与坐标轴的文字重叠
   ![image](https://user-images.githubusercontent.com/14160184/43938002-d5b8c424-9c93-11e8-8b47-404bfce08728.png)
   设置了`xAxis`的`max`和`min`点击图例切换显示会出现异常
   ![image](https://user-images.githubusercontent.com/14160184/43938037-f975d096-9c93-11e8-8a56-60ed67bee730.png)
   ![image](https://user-images.githubusercontent.com/14160184/43938046-01d967e8-9c94-11e8-9280-4eb2ce80ccb2.png)
   
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [4.1.0]:
   + Browser version [chrome 68.0.3440.84]:
   + OS Version [macos 10.13.4]:
   
   
   
   
   
   ### Expected behaviour [期望结果]
   显示正常
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
       tooltip : {
           trigger: 'axis',
           axisPointer : {            // 坐标轴指示器,坐标轴触发有效
               type : 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
           }
       },
       legend: {
           data:['利润', '支出', '收入']
       },
       grid: {
           left: '3%',
           right: '4%',
           bottom: '3%',
           containLabel: true
       },
       xAxis : [
           {
               type : 'value',
               max: function(value) {
                   return value.max * 1.5;
               },
               min: function(value) {
                   return value.min * 1.5;
               },
           }
       ],
       yAxis : [
           {
               type : 'category',
               axisTick : {show: false},
               data : ['周一','周二','周三','周四']
           }
       ],
       series : [
           {
               name:'收入',
               type:'bar',
               stack: '总量',
               label: {
                   normal: {
                       show: true,
                       position:'right'
                   }
               },
               data:[19860,21930,32330,40299]
           },
           {
               name:'支出',
               type:'bar',
               stack: '总量',
               label: {
                   normal: {
                       show: true,
                       position: 'left'
                   }
               },
               data:[-19860,-21930,-32330,-60000]
           }
       ]
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
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