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/21 18:09:25 UTC

[GitHub] git8023 opened a new issue #8914: 折线图堆叠数据(series)必须排序后才能使用, 否则图表渲染混乱

git8023 opened a new issue #8914: 折线图堆叠数据(series)必须排序后才能使用, 否则图表渲染混乱
URL: https://github.com/apache/incubator-echarts/issues/8914
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   如果**series**数组中**第一项的第一个点数值大到某个值(与其他项相同Y轴最大值至少相等,暂无其他规律)折线图图表渲染出现混乱
   
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]: **2.0**
   + Browser version [浏览器类型和版本]: **Google Chrome 版本 67.0.3396.99(正式版本)(64 位)**
   + OS Version [操作系统类型和版本]: **Windows 10 家庭中文版**
   
   
   
   
   
   ### Expected behaviour [期望结果]
   暂时解决方案:将**serial**的数据按照**serial[i].data**排序后可以正常显示(*不知道是否会造成其他问题*)。    
   期望能不排序能直接
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option ={
       "title": {
           "text": "历史报价"
       },
       "tooltip": {
           "trigger": "axis"
       },
       "legend": {
           "data": ["米莱迪有限公司", "克林顿非标汽车配件股份有限公司" ]
       },
       "grid": {
           "left": "3%",
           "right": "4%",
           "bottom": "3%",
           "containLabel": true
       },
       "toolbox": {
           "feature": {
               "saveAsImage": {}
           }
       },
       "xAxis": {
           "type": "category",
           "boundaryGap": false,
           "data": ["第1轮",  "第2轮" ]
       },
       "yAxis": {
           "type": "value"
       },
       "series": [
           {
               "name": "米莱迪有限公司",
               "type": "line",
               "stack": "总量",
               "data": [11, 1]
           },
           {
               "name": "克林顿非标汽车配件股份有限公司",
               "type": "line",
               "stack": "总量",
               "data": [0, 2]
           }
       ]
   }
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   - [官方示例](http://echarts.baidu.com/examples/editor.html?c=line-stack)截图
   修改数组第一项的值
   ```
   {
       name:'邮件营销',
       type:'line',
       stack: '总量',
       // data:[120, 132, 101, 134, 90, 230, 210]  // 原始数据
      data:[1200, 132, 101, 134, 90, 230, 210]   // 修改后
   }
   ```
   **直接运行示例程序没有任何问题**, 修改后图表渲染错误
   ![image](https://user-images.githubusercontent.com/12026601/44419247-390eda00-a5ad-11e8-8911-d584384aeb59.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