You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/12/13 06:04:37 UTC

[GitHub] [incubator-echarts] dongsuo commented on issue #7959: API: echarts.clear() 该方法清空当前实例。使用该方法后调用 getOption 方法返回并不是空对象

dongsuo commented on issue #7959: API: echarts.clear() 该方法清空当前实例。使用该方法后调用 getOption 方法返回并不是空对象
URL: https://github.com/apache/incubator-echarts/issues/7959#issuecomment-565313048
 
 
   嗯,我看了下 issue 里提到 clear 方法实际上是调用了setOption({series:[]}),我以为改成setOption({}) 就可以解决,结果发现 setOption 方法好像也不符合期望
   ```
   myChart.setOption({}, true)
   console.log(myChart.getOption())  //  打印出来的 option 并不为空
   ```
   

----------------------------------------------------------------
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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org