echarts 关系图 和 热力图的引用
2017-12-12 本文已影响0人
婷诗漾
用echarts 在一个页面 实现如下 效果
![](https://img.haomeiwen.com/i6995387/170fc093eec4888e.png)
文件格式, 如下图
![](https://img.haomeiwen.com/i6995387/9edb6d3ec2d75c35.png)
碰到的问题
1. 一个APP的问题 , 这个好解决
2, cannot read property 'type' of undefined
3, cannot read property 'attributes' of undefined
![](https://img.haomeiwen.com/i6995387/f11d05194d1b1311.png)
app 的错误, echarts官方实例中, 热力图和百度地图扩展的那一页代码中的所有的与app 有关的删掉。
type 和 attribute的 问题的解决方法 是 通过
四个chart的js 里面的四个
定义四个option 和 定义四个不同的 myChart。
var myChart4 = echarts.init(document.getElementById('chart4'));
得引入百度地图的接口地址, 如下图所示
![](https://img.haomeiwen.com/i6995387/a02a7d0d8f16b4cf.png)
Ok , 完美解决。
附上, 代码的地址连接的地址 链接:https://pan.baidu.com/s/1eSvV5L4 密码:m5xa