';
// return tipHtml;
// } else {
// return '';
// }
return name;
}
},
geo: {
map: 'tengzhou',
aspectScale: 1, //长宽比
// aspectScale: 1, //长宽比
zoom: 1.1,
roam: true,
label: {
normal: {
show: true,
formatter: '{b}',
textStyle: {
color: '#FFF',
fontSize: 20
}
},
emphasis: {
textStyle: {
color: '#fff'
}
}
},
itemStyle: {
normal: {
// areaColor: '#013C62',
// shadowColor: '#182f68',
// shadowOffsetX: 0,
// shadowOffsetY: 25
borderColor: '#00FFFF',
borderWidth: 2,
// areaColor: '#12235c'
areaColor: '#00B2ED'
},
emphasis: {
areaColor: '#2AB8FF',
borderWidth: 0,
color: 'green',
label: {
show: false
}
}
}
},
series: [
// {
// type: 'map',
// roam: false,
// label: {
// normal: {
// show: true,
// formatter: '{b}',
// textStyle: {
// color: '#fff'
// }
// },
// emphasis: {
// textStyle: {
// color: '#fff'
// }
// }
// },
// itemStyle: {
// normal: {
// borderColor: '#2ab8ff',
// borderWidth: 1.5,
// areaColor: '#12235c'
// },
// emphasis: {
// areaColor: '#2AB8FF',
// borderWidth: 0,
// color: 'green'
// }
// },
// zoom: 1.2,
// roam: true,
// map: 'tengzhou' //使用
// // data: this.difficultData //热力图数据 不同区域 不同的底色
// },
{
name: 'Top 5',
type: 'effectScatter',
coordinateSystem: 'geo',
data: mapDate,
symbolSize: function(val) {
return 15;
},
showEffectOn: 'render',
rippleEffect: {
brushType: 'stroke'
},
hoverAnimation: true,
label: {
normal: {
formatter: '{b}',
position: 'top',
show: true
}
},
itemStyle: {
color: '#fff',
normal: {
color: '#00FFFF',
shadowBlur: 20,
shadowColor: '#00FFFF'
}
},
zlevel: 1
},
]
};
myChart.setOption(option);
});
myChart.on('click', function(param) {
console.log(param);
var seriesIndex = param.seriesIndex;
var dataIndex = param.dataIndex;
option.series[seriesIndex].itemStyle = {
color: function(params) {
if (dataIndex === params.dataIndex) {
return '#FA8C16'
}else{
return '#fff'
}
}
}
myChart.setOption(option)
});