There is a chart instance already initialized on the dom
来源:互联网 发布:centos mysql启动失败 编辑:程序博客网 时间:2024/06/06 01:30
使用Echarts插件的时候,多次加载会出现There is a chart instance already initialized on the dom.这个错误,改插件已经加载完成。
解决方法:
在方法最外层定义全局变量
var myChart;
然后在插件使用方法中:
if (myChart != null && myChart != "" && myChart != undefined) { myChart.dispose(); }// 基于准备好的dom,初始化echarts实例 myChart = echarts.init(document.getElementById('sjtjt'));
最重要的就是全局定义和方法开头的判断然后
myChart.dispose();!!!!!!
阅读全文
1 0
- There is a chart instance already initialized on the dom
- 使用echarts防止出现“There is a chart instance already initialized on the dom.”的警告
- There is a process already using the admin port 4848
- The ASM instance configured on the local node is a single-instance ASM
- Spyder is already running. If you want to open a new instance, please pass to it the --new-instance
- WCF分布式开发常见错误(11):There is already a listener on IP endpoint ,IP 终结点 已经存在侦听器,
- Dynamics CRM2013 Server2012R2下IFD部署遇到There is already a listener on IP endpoint的解决方法
- There is already a statement named search in this SqlMap.
- there is a problem parsing the package
- There is a cycle in the hierarchy
- There is a cycle in the hierarchy !!!
- There is a cycle in the hierarchy
- There is a cycle in the hierarchy
- There is a cycle in the hierarchy!
- kafka : A broker is already registered on the path /brokers/ids/1006. This proba
- The folder is already a source folder
- The folder is already a source folder
- There is already '******' bean method
- IO流 字符流 字节流 缓冲流 文件的复制
- JVM
- HttpWatch学习笔记一
- SpringBoot 和 MyBatis
- GYM 100801J Journey to the “The World's Start”
- There is a chart instance already initialized on the dom
- ajax问题
- scrapy的简单应用-抓取链家数据
- opencv中copyTo的用法
- 递归return需注意
- 51 nod 1693 水群(最短路)
- JAVA中对list map根据map某个key值进行排序
- 极光推送
- IO流--字节流