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 2019/05/07 08:12:27 UTC

[GitHub] [incubator-echarts] Adele0 opened a new issue #10406: 异步多条line图形页面渲染出错

Adele0 opened a new issue #10406: 异步多条line图形页面渲染出错
URL: https://github.com/apache/incubator-echarts/issues/10406
 
 
   ### Version
   4.2.1
   
   ### Steps to reproduce
   ```
   this.chart.setOption({
               legend: {
                 data: (function (){
                   let list = [];
                   for (let i = 0; i < _this.chartData.length; i  ) {
                     list.push(_this.chartData[i].shipperName);
                   }
                   return list;
                 })()
               },
               series: 
                 (function () {
                   let list = [];
                   for (let i = 0; i < _this.chartData.length; i  ) {
                     let obj = {
                       name:  _this.chartData[i].shipperName,
                       type: 'line',
                       stack: '总量',
                       data: (function (){
                         let inner = []
                         _this.chartData[i].statistics.map((item) => {
                           inner.push(item)
                         })
                         return inner;
                       })()
                     }
                     list.push(obj)
                     debugger
                   }
                   return list;
                 })(),
             })
   ```
   
   ### What is expected?
   异步多次添加折线,多条折线的数据在视图上正常显示
   
   ### What is actually happening?
   多条折线显示数据不能同时正确显示,其他折线隐藏的情况下,数据正常
   
   ---
   ## 补充
   
   // 不知道怎么在本issue中添加图片(希望我的文字描述能达到图片的效果)
   
   业务场景:用户每次点击按钮(回车)请求一次后台,得到一条折线
   
   发现bug的场景:添加第一条折线,调试工具里看到的series里的data为[0,0,0,0,2],折线数据也没有问题;添加第二条折线,调试工具里看到的series里的data为[0,0,0,0,2]和[0,0,0,0,0],视图显示却是第二条折线与第一条折线重合。分别点击隐藏折线时,数据和折线能对应上,但是同时显示还是出现两条折线重叠的情况。
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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