148行
我用
,data:[
{
coords: [[3, 1],[1, 1]],
fromName:"北京",
toName:"上海"
}
]
会报错
Uncaught TypeError: Cannot read property 'dataToPoint' of undefined
求助
配置项如下
option = {
title: {
text: 'hhh',
x: 'center',
y: 0
},
grid: [
{x: '7%', y: '7%', width: '38%', height: '38%',show:false,containLabel:true},
{x2: '7%', y: '7%', width: '38%', height: '38%',show:false,containLabel:false},
{x: '7%', y2: '7%', width: '38%', height: '38%',show:false},
{x2: '7%', y2: '7%', width: '38%', height: '38%',show:false}
],
xAxis: [
{gridIndex: 0, min: 0, max: 2,minInterval:1,show:false},
{gridIndex: 1, min: 0, max: 3,minInterval:1,show:false},
{gridIndex: 2, min: 0, max: 4,minInterval:1,show:false},
{gridIndex: 3, min: 0, max: 3,minInterval:1,show:false}
],
yAxis: [
{gridIndex: 0, min: 0, max: 2,minInterval:1,show:false},
{gridIndex: 1, min: 0, max: 2,minInterval:1,show:false},
{gridIndex: 2, min: 0, max: 2,minInterval:1,show:false},
{gridIndex: 3, min: 0, max: 2,minInterval:1,show:false}
],
series: [{
name: 'top-1',
type: 'effectScatter',
data:[[1, 1]],
symbolSize:25,
xAxisIndex: 0,
yAxisIndex: 0,
itemStyle: {
normal: {
color: '#ddb926'
}
}
},
{
name: 'scopen-197',
type: 'effectScatter',
data:[[2, 1]],
symbolSize:25,
xAxisIndex: 1,
yAxisIndex: 1,
itemStyle: {
normal: {
color: 'red'
}
}
},
{
name: 'scopen-63',
type: 'effectScatter',
data:[[1, 1]],
symbolSize:25,
xAxisIndex: 1,
yAxisIndex: 1,
itemStyle: {
normal: {
color: 'red'
}
}
},
{
name: 'erp-1',
type: 'effectScatter',
data:[[1, 1]],
symbolSize:25,
xAxisIndex: 2,
yAxisIndex: 2,
itemStyle: {
normal: {
color: 'blue'
}
}
},
{
name: 'erp-2',
type: 'effectScatter',
data:[[2, 1]],
symbolSize:25,
xAxisIndex: 2,
yAxisIndex: 2,
itemStyle: {
normal: {
color: 'blue'
}
}
},
{
name: 'erp-3',
type: 'effectScatter',
data:[[3, 1]],
symbolSize:25,
xAxisIndex: 2,
yAxisIndex: 2,
itemStyle: {
normal: {
color: 'blue'
}
}
},
{
name: 'crm-1',
type: 'effectScatter',
data:[[1, 1]],
symbolSize:25,
xAxisIndex: 3,
yAxisIndex: 3,
itemStyle: {
normal: {
color: '#000'
}
}
},
{
name: 'crm-2',
type: 'effectScatter',
symbolSize:25,
data:[[2, 1]],
xAxisIndex: 3,
yAxisIndex: 3,
itemStyle: {
normal: {
color: '#000'
}
}
},
{
name: 'crm-2 to scopen-63',
coordinateSystem:'cartesian2d',
type: 'lines',
xAxisIndex: 3,
yAxisIndex: 3,
gridIndex: 3,
symbol: ['none', 'arrow'],
symbolSize: 10,
zlevel: 2,
lineStyle: {
normal: {
color: '#a6c84c',
width: 1,
opacity: 0.4,
curveness: 0.2
}
}
,data:[ { coords: [[3, 1],[1, 4]], fromName:"北京", toName:"上海" } ]
}
]
}