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/15 06:50:43 UTC

[GitHub] zx69 opened a new issue #8338: 数据堆叠时最大值计算错误

zx69 opened a new issue #8338: 数据堆叠时最大值计算错误
URL: https://github.com/apache/incubator-echarts/issues/8338
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   项目中同时采用stack数据堆叠、series.data数据分组,结果柱状图的高度超出yAxis的最大值,突出图表。
   配置项如下:
   ```
   option = {
     "title": {
       "text": "每日各工位分时执行量统计"
     },
     "color": [
       "#91c7ae",
       "#c23531",
       "#6e7074",
       "#749f83",
       "#d48265",
       "#2f4554",
       "#61a0a8",
       "#ca8622",
       "#546570",
       "#bda29a",
       "#c4ccd3"
     ],
     "tooltip": {
       "trigger": "axis",
       "axisPointer": {
         "type": "cross",
         "label": {
           "precision": 0
         },
         "crossStyle": {
           "color": "#999"
         }
       }
     },
     "legend": {
       "right": 0,
       "data": [
         "入库单数",
         "出库单数",
         "盘点单数",
         "入库SKU数",
         "出库SKU数",
         "盘点SKU数"
       ]
     },
     "xAxis": [
       {
         "data": [
           "05-15-00时",
           "05-15-01时",
           "05-15-02时",
           "05-15-03时",
           "05-15-04时",
           "05-15-05时",
           "05-15-06时",
           "05-15-07时",
           "05-15-08时",
           "05-15-09时",
           "05-15-10时",
           "05-15-11时",
           "05-15-12时",
           "05-15-13时",
           "05-15-14时",
           "05-15-15时",
           "05-15-16时",
           "05-15-17时",
           "05-15-18时",
           "05-15-19时",
           "05-15-20时",
           "05-15-21时",
           "05-15-22时",
           "05-15-23时",
           "05-12-00时",
           "05-12-01时",
           "05-12-02时",
           "05-12-03时",
           "05-12-04时",
           "05-12-05时",
           "05-12-06时",
           "05-12-07时",
           "05-12-08时",
           "05-12-09时",
           "05-12-10时",
           "05-12-11时",
           "05-12-12时",
           "05-12-13时",
           "05-12-14时",
           "05-12-15时",
           "05-12-16时",
           "05-12-17时",
           "05-12-18时",
           "05-12-19时",
           "05-12-20时",
           "05-12-21时",
           "05-12-22时",
           "05-12-23时",
           "05-04-00时",
           "05-04-01时",
           "05-04-02时",
           "05-04-03时",
           "05-04-04时",
           "05-04-05时",
           "05-04-06时",
           "05-04-07时",
           "05-04-08时",
           "05-04-09时",
           "05-04-10时",
           "05-04-11时",
           "05-04-12时",
           "05-04-13时",
           "05-04-14时",
           "05-04-15时",
           "05-04-16时",
           "05-04-17时",
           "05-04-18时",
           "05-04-19时",
           "05-04-20时",
           "05-04-21时",
           "05-04-22时",
           "05-04-23时",
           "05-03-00时",
           "05-03-01时",
           "05-03-02时",
           "05-03-03时",
           "05-03-04时",
           "05-03-05时",
           "05-03-06时",
           "05-03-07时",
           "05-03-08时",
           "05-03-09时",
           "05-03-10时",
           "05-03-11时",
           "05-03-12时",
           "05-03-13时",
           "05-03-14时",
           "05-03-15时",
           "05-03-16时",
           "05-03-17时",
           "05-03-18时",
           "05-03-19时",
           "05-03-20时",
           "05-03-21时",
           "05-03-22时",
           "05-03-23时"
         ],
         "axisPointer": {
           "type": "shadow"
         }
       }
     ],
     "yAxis": [
       {
         "type": "value",
         "name": "处理单数",
         "axisLabel": {
           "formatter": "{value}单"
         }
       },
       {
         "type": "value",
         "name": "处理SKU数",
         "axisLabel": {
           "formatter": "{value}件"
         }
       }
     ],
     "series": [
       {
         "name": "出库单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "出库单数",
         "itemStyle": {
           "color": "#c23531"
         },
         "data": [
           [
             "05-15-10时",
             3,
             "STATIONA"
           ],
           [
             "05-15-10时",
             3,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "出库SKU数",
         "itemStyle": {
           "color": "#d48265"
         },
         "data": [
           [
             "05-15-10时",
             3,
             "STATIONA"
           ],
           [
             "05-15-10时",
             3,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "盘点单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "盘点单数",
         "itemStyle": {
           "color": "#546570"
         },
         "data": [
           [
             "05-12-15时",
             1,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "盘点SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "盘点SKU数",
         "itemStyle": {
           "color": "#2f4554"
         },
         "data": [
           [
             "05-12-15时",
             1998,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "盘点单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "盘点单数",
         "itemStyle": {
           "color": "#546570"
         },
         "data": [
           [
             "05-12-14时",
             1,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "盘点SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "盘点SKU数",
         "itemStyle": {
           "color": "#2f4554"
         },
         "data": [
           [
             "05-12-14时",
             999,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "出库单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "出库单数",
         "itemStyle": {
           "color": "#c23531"
         },
         "data": [
           [
             "05-04-09时",
             51,
             "STATIOND"
           ],
           [
             "05-04-09时",
             35,
             "STATIONC"
           ],
           [
             "05-04-09时",
             49,
             "STATIONB"
           ],
           [
             "05-04-09时",
             67,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "出库SKU数",
         "itemStyle": {
           "color": "#d48265"
         },
         "data": [
           [
             "05-04-09时",
             74,
             "STATIOND"
           ],
           [
             "05-04-09时",
             63,
             "STATIONC"
           ],
           [
             "05-04-09时",
             74,
             "STATIONB"
           ],
           [
             "05-04-09时",
             102,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "出库单数",
         "itemStyle": {
           "color": "#c23531"
         },
         "data": [
           [
             "05-04-08时",
             118,
             "STATIOND"
           ],
           [
             "05-04-08时",
             104,
             "STATIONC"
           ],
           [
             "05-04-08时",
             126,
             "STATIONB"
           ],
           [
             "05-04-08时",
             114,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "出库SKU数",
         "itemStyle": {
           "color": "#d48265"
         },
         "data": [
           [
             "05-04-08时",
             152,
             "STATIOND"
           ],
           [
             "05-04-08时",
             252,
             "STATIONC"
           ],
           [
             "05-04-08时",
             211,
             "STATIONB"
           ],
           [
             "05-04-08时",
             211,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "盘点单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "盘点单数",
         "itemStyle": {
           "color": "#546570"
         },
         "data": [
           [
             "05-04-00时",
             12,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "盘点SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "盘点SKU数",
         "itemStyle": {
           "color": "#2f4554"
         },
         "data": [
           [
             "05-04-00时",
             415,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "出库单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "出库单数",
         "itemStyle": {
           "color": "#c23531"
         },
         "data": [
           [
             "05-03-09时",
             51,
             "STATIOND"
           ],
           [
             "05-03-09时",
             35,
             "STATIONC"
           ],
           [
             "05-03-09时",
             49,
             "STATIONB"
           ],
           [
             "05-03-09时",
             67,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "出库SKU数",
         "itemStyle": {
           "color": "#d48265"
         },
         "data": [
           [
             "05-03-09时",
             74,
             "STATIOND"
           ],
           [
             "05-03-09时",
             63,
             "STATIONC"
           ],
           [
             "05-03-09时",
             74,
             "STATIONB"
           ],
           [
             "05-03-09时",
             102,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "出库单数",
         "itemStyle": {
           "color": "#c23531"
         },
         "data": [
           [
             "05-03-08时",
             118,
             "STATIOND"
           ],
           [
             "05-03-08时",
             104,
             "STATIONC"
           ],
           [
             "05-03-08时",
             126,
             "STATIONB"
           ],
           [
             "05-03-08时",
             114,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "出库SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "出库SKU数",
         "itemStyle": {
           "color": "#d48265"
         },
         "data": [
           [
             "05-03-08时",
             152,
             "STATIOND"
           ],
           [
             "05-03-08时",
             252,
             "STATIONC"
           ],
           [
             "05-03-08时",
             211,
             "STATIONB"
           ],
           [
             "05-03-08时",
             211,
             "STATIONA"
           ]
         ]
       },
       {
         "name": "盘点单数",
         "type": "bar",
         "yAxisIndex": 0,
         "stack": "盘点单数",
         "itemStyle": {
           "color": "#546570"
         },
         "data": [
           [
             "05-03-00时",
             12,
             "STATIONC"
           ]
         ]
       },
       {
         "name": "盘点SKU数",
         "type": "bar",
         "yAxisIndex": 1,
         "stack": "盘点SKU数",
         "itemStyle": {
           "color": "#2f4554"
         },
         "data": [
           [
             "05-03-00时",
             415,
             "STATIONC"
           ]
         ]
       }
     ]
   }
   ```
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:
   + Browser version [浏览器类型和版本]:
   + OS Version [操作系统类型和版本]:
   
   最新版chrome
   
   
   
   ### Expected behaviour [期望结果]
   
   准确计算最大值
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
   
   }
   
   ```
   
   
   
   
   ### 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