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 2020/03/01 13:47:30 UTC

[GitHub] [incubator-echarts] AABig commented on issue #3314: 滚轮放大后的map地图,能通过什么方法将地图重新复位到初始化的地方

AABig commented on issue #3314: 滚轮放大后的map地图,能通过什么方法将地图重新复位到初始化的地方
URL: https://github.com/apache/incubator-echarts/issues/3314#issuecomment-593099286
 
 
   我也遇到了这样的问题,在尝试setOption(option, true)无效后,终于找到了一个方法:
   `
   chart.clear()
   chart.setOption(option)
   `
   clear方法会清空当前实例,会移除实例中所有的组件和图表。清空后调用 getOption 方法返回一个{}空对象。
   清空后通过调用setOption方法重新设置,自然就得到初始的图表了~

----------------------------------------------------------------
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