(原)Echarts 报Uncaught Error: Initialize failed: invalid dom 根本解决
1.循环出的Echarts出现 Uncaught Error: Initialize failed: invalid dom ,附上完美解决方案
setTimeout(function () {
console.log(item.id)
console.log(item.val)
console.log(item.color)
var option = {
legend: {
orient: "vertical",
x: "left",
y: "top"
},
series: [{
name: "访问来源",
type: "pie",
radius: ["88%", "100%"],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: "center"
},
emphasis: {
show: true,
textStyle: {}
}
},
labelLine: {
normal: {
show: false
}
},
data: [{
value: item.val
},
{
value: 100 - item.val
}
],
color: [item.color, "#e9e9e9"]
}]
}; console.log($("#ecartsid_1"));
let myChart = echarts.init(document.getElementById(item.id));
myChart.setOption(option);
myChart = null;
}, 1)
2.结合vue
view 结构:
(原)Echarts 报Uncaught Error: Initialize failed: invalid dom 根本解决的更多相关文章
- echarts.js:1136 Uncaught Error: Initialize failed: invalid dom.
一:错误描述:echarts.js:1136 Uncaught Error: Initialize failed: invalid dom. 二:错误原因:echarts在用json数据请求时未调用 ...
- javaMail使用163邮箱报535 Error: authentication failed
javaMail使用网易163邮箱或者是126或者是网易其他邮箱报535 Error: authentication failed javax.mail.AuthenticationFailedExc ...
- LR报:Error 27796 Failed to connect to server
原错误信息: Action.c(58): Error -27796: Failed to connect to server "10.1.44.68:7013": [10048] ...
- Namenode主节点停止报错 Error: flush failed for required journal
主节点间歇性报错其他没有问题 ,SNN的NN没有问题,相关的journalNode也都在,就是主节点的NN会停止. 查看hadoop主节点的NN日志. 2016-11-21 22:36:40,908 ...
- Jenkins之发布报错“error: RPC failed; curl 18 transfer closed with outstanding read data remaining”
报错信息: error: RPC failed; curl transfer closed with outstanding read data remaining fatal: The remote ...
- pod lib create ObjcName 时候报错error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
众所周知 pod lib create ObjcName 需要从git 上边克隆模版 :https://github.com/CocoaPods/pod-template.git 然后有时候会很慢报错 ...
- 安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决
在androidstuio中运行我的未完项目,报错: Error:Execution failed for task ':app:transformClassesWithDexForDebug'.&g ...
- git报错error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
报错 $ git push; Enumerating objects: 1002, done. Counting objects: 100% (1002/1002), done. Delta comp ...
- WebViewer报错Error loading document: Invalid XOD file: Zip end header data is wrong size!
错误:Error loading document: Invalid XOD file: Zip end header data is wrong size! 解决:https://groups.go ...
随机推荐
- jQuery的杂项
<script src="引入插件"></script> 位置应写在head中,在http协议中,当你浏览网页时,会先加载head里面的东西 刷新页面时 ...
- The type android.support.v4.view.ScrollingView cannot be resolved. It is indirectly referenced from
前几天另一个项目使用RecyclerView控件,引用类库然后继承一切都很顺序 详细:http://www.cnblogs.com/freexiaoyu/p/5022602.html 今天打算将另一个 ...
- bootstraptable学习(2)分页
1.分页需要配置一些参数 function init() { $('#bootstrapModel').bootstrapTable({ url: "../Listing.ashx" ...
- AD中组的概念
- dns 域名地址
Public DNS+ 是属于 腾讯云旗下的公共 DNS 服务.拥有 80 多条国内线路和 4 条海外线路,有 BGP Anycast 技术,也是国内首家支持谷歌 ECS (edns-client-s ...
- 了解Katalon的安装及基本使用(for mac)
一.整体了解: 2018 top 6的自动化测试工具(网上了解): 1. Selenium 2. Katalon Studio 3. UFT 4. Watir 5. IBM Rational Func ...
- JVM总结-垃圾回收
Java 虚拟机的自动内存管理,将原本需要由开发人员手动回收的内存,交给垃圾回收器来自动回收.不过既然是自动机制,肯定没法做到像手动回收那般精准高效 [1] ,而且还会带来不少与垃圾回收实现相关的问题 ...
- centos7 jdk
查看已经自带的jdk: rpm -qa | grep jdk 卸载 sudo yum remove XXX 1.下载 jdk-8u101-linux-x64.rpm http://www.orac ...
- [java] 屏蔽ie浏览器中F1帮助
实现某一功能时需要屏蔽IE浏览器中的F1,F2快捷键. 百度后发现如下代码 var jq$ = jQuery.noConflict(); //防止$符号与其他的冲突 jq$(document).rea ...
- python零散补充与总结
一 有一种情况,在Windows系统上面有一个文件,编码为gbk,将其上传到Linux虚拟机,系统编码为utf-8, 使用cat命令查看时是乱码,这时如何解决? [root@localhost ~]# ...