如何动态修改 theme ?
One-line summary [问题简述]
实际使用中,使用 theme_a 初始化了 echarts 实例,然后需要切换为 theme_b,这个时候必须要先销毁 echarts 实例,然后再创建一个新的实例吗?
Version & Environment [版本及环境]
- ECharts version [ECharts 版本]: 3.0.0 +
Expected behaviour [期望结果]
是否有 echarts.setTheme(theme) 的 API,可以动态修改主题样式。
暂时没办法动态切换,setTheme 方式切换回造成之前的主题样式泄露到新主题。所以最好是先销毁再重新创建
Get. https://github.com/hustcc/echarts-for-react/issues/24
This would be awesome! Right now I have to destroy the chart and recreate it. Unfortunately after doing so I have to set all my options again, since they are being changed dynamically by the user as well. If we could set it dynamically that would make it so much easier!
Also, great work on this js library, it is seriously awesome. :)
请问现在的版本是否可以支持动态设置主题了,在实例中看到了setTheme这个API,但在官方文档上没有找到相关的说明。
新版本并没有看到setTheme()