ihuangxinyu opened a new issue #11310: 标题title渲染了两遍, legend.data和series均为空数组时,
URL: https://github.com/apache/incubator-echarts/issues/11310
 
 
   ### Version
   4.3.0
   
   ### Steps to reproduce
   1.watch 数据集变化,然后执行渲染图表的repain函数,
   
   2.repain函数里,初始化chart,填充option,然后setOption(option, true)
   
   3.当option里, lengend.data=[], series=[],即二者同时为空数组时,标题渲染了两遍,如下图
   
![15_38_33__09_24_2019](https://user-images.githubusercontent.com/45959937/65494145-d346fd00-dee6-11e9-8def-50e5da5fd8fa.jpg)
   4.当我把series设为 [[]] 或者 {} 时,标题恢复正常的一遍,然而,控制台此时报错series.type需要指定类型, 如下图
   
![16_19_39__09_24_2019](https://user-images.githubusercontent.com/45959937/65494322-333da380-dee7-11e9-91d6-3a3df87ab05c.jpg)
   
   5.当我把series设为 [[{type:"line"}]] 和 {type: 'line'} ,此两种情况不再类型报错,但是导致标题渲染两遍
   
   6.总结:
   
   ——legend=[],   series = [] || [[{ type: 'line'} ]] || { type: 'line' }  :  
标题渲染两遍, 不报类型错误
   
   ——legend=[],   series = [[]]  || {}   :标题正常,报类型错误
   
   7.
   
   在Chrome和Safari最新版上都有重现。
   
   两遍标题和类型错误都无法在gallery重现。
   
   ### What is expected?
   不报类型错误,标题正常渲染
   
   ### What is actually happening?
   二者出其一
   
   ---
   希望得到legend和series都为空时候的处理方法
   
   <!-- 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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to