Closed EarlEcho closed 5 years ago
我也出现了一样的问题,解决了吗?怎么解决的?
我也遇到了这个问题.我的是在react 项目中出现的.代码如下
const chart = Echarts.init(container);
Echarts.GLMap = map; // map = new mapboxgl.Map();
chart.setOption({
series: [{
type: 'lines',
coordinateSystem: 'GlMap',
data: [
[103.8414, 30.7312],
[103.9636, 30.5031]
],
lineStyle: {
normal: {
opacity: 0.05,
width: 0.5,
curveness: 0.5
}
},
blendMode: 'lighter'
}],
});
`
断点调试发现在 linesLayout.js中 第七行 var coordSys = seriesModel.coordinateSystem;
seriesModel没有coordinateSystem,而seriesModel.option中有coordinateSystem.
请问是我使用方式不对还是其他原因?
把
type: lines
改为
type: line
试试
我也遇到这个问题,请问解决了吗? 我是用vue-charts是在linesLayout.js里coorSys.dataToPoint报错,其中coorSyS是null 不知道为何,
series:[{
type:'lines',
coordinateSystem:'bmap',
data:[...],
// ....
}]
@baggiomygod 你好 问题解决了么?
@EarlEcho 请问问题解决了吗?
我引入这个组件后可以了 require('echarts/lib/component/geo')
@all 大家解决了么?我在vue使用中也遇到这个报错
Please follow this example: http://gallery.echartsjs.com/editor.html?c=xBkrP1lbqG Tell me if it doesn't work.
用bmap,我感觉缺少了bmap的插件,于是我尝试 import 'echarts/extension/bmap/bmap.js' 之后OK了,剩下的问题就是缺少BMap的API了
刚了下,你的情况和我的一样,我刚刚解决了,可以参考下,若有不正确,欢迎指正 https://www.cnblogs.com/limn/p/10614926.html
我也是lines在geo地图上可以显示飞线图,后来把geo换成bmap出了这个问题。 仔细研究了一下文档:https://echarts.baidu.com/option.html#series-lines.coordinateSystem 发现lines坐标系统默认选的geo,手动设置成bmap就ok了~
确保引入了bmap.min.js,然后配置 coordinateSystem: 'bmap'就可以了,如果用的是bmap的话
使用require('echarts/lib/component/geo'),还需要再配置里面option加入
geo:{ ... }
的相关配置。这样才能再echart渲染的时候使用geo组件,例如:
{"geo":{"map":"insideMap","label":{"emphasis":{"show":true,"color":"#fff"}},"roam":true,"itemStyle":{"normal":{"areaColor":"#323c48","borderColor":"#404a59"},"emphasis":{"areaColor":"#2a333d"}}},"series":[{"name":"map","type":"map","map":"insideMap"},{"type":"lines","name":"flyLine"}]}
为什么一定要用bmap。。。
Please follow this example: http://gallery.echartsjs.com/editor.html?c=xBkrP1lbqG Tell me if it doesn't work.
为什么现在echarts的demo里面关于地图和飞线图的例子全都是基于百度地图?没有纯地图的demo啊
我的理解是,要在地图上通过经纬度来绘制lines,必须要有坐标类型的地图,我添加了一个 geo 就不会报这个错了 楼上很多人用bmap的应该也是这个原因吧
One-line summary [问题简述]
在使用map和lines完成数据迁移功能时,lines中的data[i].coords熟悉出现Cannot read property 'dataToPoint' of undefined"的报错
Version & Environment [版本及环境]
Expected behaviour [期望结果]:期望解决这个问题,并使程序正常显示。
ECharts option [ECharts配置项]
Other comments [其他信息]
我是在vue项目中使用的echarts, image
报错如下: