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/07/19 10:50:46 UTC

[GitHub] victor-deng-github opened a new issue #8727: 双轴,右侧Y轴的柱形图如果有负数,右轴的柱状图显示有问题

victor-deng-github opened a new issue #8727: 双轴,右侧Y轴的柱形图如果有负数,右轴的柱状图显示有问题
URL: https://github.com/apache/incubator-echarts/issues/8727
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   ### One-line summary [问题简述]
   双轴,
   左轴含有负数据,柱状图正常。
   右轴含有负数据,右轴的柱状图不从0开始,而是从底部开始。
   ![111](https://user-images.githubusercontent.com/31848023/42938218-1c1785a2-8b84-11e8-8b2c-39b9f24745f5.png)
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:4.10
   + Browser version [浏览器类型和版本]:chrome、360浏览器
   + OS Version [操作系统类型和版本]:window
   
   ### Expected behaviour [期望结果]
   右轴含有负数据的时候,右轴的柱状图能和左轴的柱状图一样从0开始。
   ![222222](https://user-images.githubusercontent.com/31848023/42938284-59e391be-8b84-11e8-96d3-1e1ce1961858.png)
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
       xAxis : [
           {
               type : 'category',
               data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
           }
       ],
       yAxis : [
           {
               name:"利润",
               type : 'value'
           },
           {
               name:"利润率",
               type : 'value'
           }
       ],
       series : [
           {
               name:'利润',
               type:'bar',
               data:[2.0, 4.9, 7.0, -23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
           },
           {
               yAxisIndex:1,
               name:'利润率',
               type:'bar',
               data:[2.6, 5.9, 9.0, -26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
           }
       ]
   };
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   正确的:
   ![222222](https://user-images.githubusercontent.com/31848023/42938284-59e391be-8b84-11e8-96d3-1e1ce1961858.png)
   
   有问题的:
   ![111](https://user-images.githubusercontent.com/31848023/42938218-1c1785a2-8b84-11e8-8b2c-39b9f24745f5.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