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/05/22 06:49:34 UTC

[GitHub] liyanyan1994 opened a new issue #8380: 堆叠条形图中在x轴使用min设置最小值,data的数据还是从0开始进行堆叠,如何设置从指定的最小值开始进行堆叠?

liyanyan1994 opened a new issue #8380: 堆叠条形图中在x轴使用min设置最小值,data的数据还是从0开始进行堆叠,如何设置从指定的最小值开始进行堆叠?
URL: https://github.com/apache/incubator-echarts/issues/8380
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   设置
     xAxis: {
             boundaryGap: true, 
             min:1000, // 设置最小值
             max: 2000, // 设置最大值
             interval:200,
             type: 'value'
         }
   在Y轴上的堆叠图还是从0的下标开始进行绘图的
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]: 3.x
   + Browser version [浏览器类型和版本]: 直接在echart在线examples进行
   + OS Version [操作系统类型和版本]:
   
   
   
   
   
   ### Expected behaviour [期望结果]
   
   ![image](https://user-images.githubusercontent.com/16284458/40346311-fa021ac8-5dce-11e8-9c90-1caf0ca12af7.png)
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
   title: {
             text: '二维码分配状态显示图',
             textStyle: {
               color: '#4a4a4a',
               fontFamily: 'Helvetica Neue',
               fontSize: 14
             },
             x: 'center',
             top: '20px'
           },
           legend: {
             orient: 'horizontal',
             width: '220px',
             top: '8%',
             right: '4%',
             data: ['未分配', '已分配', '已废除', '选择范围'],
             textStyle: {
               fontSize: 14
             }
           },
           grid: {
             left: '3%',
             right: '4%',
             bottom: '3%',
             containLabel: true
           },
           xAxis: {
             boundaryGap: true,
             min:1000, // 设置最小值
             max: 2000, // 设置最大值
             type: 'value',
             interval:200, // 最小刻度
             splitLine: {
               // 去掉X轴上的Y网格线
               show: false
             },
             axisLine: {
               // X轴轴线相关设置
               lineStyle: {
                 color: '#979797' // 轴线颜色
               }
             },
             // 坐标刻度相关设置
             axisTick: {
               inside: true // 刻度朝内
             }
           },
           yAxis: {
             show: false, // 不显示Y轴
             type: 'category',
             data: ['数量']
           },
           series:[{
               name: '已分配',
               barWidth: '30px',
               type: 'bar',
               stack: '分配量',
               itemStyle: {
                 normal: {
                   color: '#4CA4cF'
                 }
               },
               label: {
                 normal: {
                   show: true,
                   color: '#fff'
                 }
               },
               data: [300]
             },{
               name: '已废除',
               barWidth: '30px',
               type: 'bar',
               stack: '分配量',
               itemStyle: {
                 normal: {
                   color: '#bababa'
                 }
               },
               label: {
                 normal: {
                   show: true,
                   color: '#fff'
                 }
               },
               data: [100]
             }]
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   实际上代码出来的结果是从0下标开始的,图形上看不到任何的图形,需要如何更改or设置属性??
   

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