我的網盤----平復-----總結版本map
部分代碼:
var option = {
tooltip : {
trigger: 'item', //提示框的觸發類型。
formatter: '<div style="padding:8px"><p class="map_p">當日掛號:<span >'+map_num+'</span></p><p class="map_p">當日門診量:<span>'+map_num+'</span></p><p>當日轉診量:<span>'+map_num+'</span></p></div>'
},
series: [
{
type: 'effectScatter',
coordinateSystem: 'geo',
symbolSize: 6,
itemStyle: {
normal: {
color: '#1a97b1',
},
},
data: cityAddress1
}, {
name: 'categoryA',//用於自動彈出提示信息,配合dispatchAction使用
type: 'map',
geoIndex: 0,
data:[
{name: '石家庄', },
{name: '保定', },
{name: '張家口', },
{name: '承德', },
{name: '秦皇島', },
{name: '唐山', },
{name: '廊坊', },
{name: '滄州', },
{name: '邯鄲', },
{name: '衡水', },
{name: '邢台', },
]
}, {
type: 'effectScatter',
coordinateSystem: 'geo',
symbolSize: 6,
itemStyle: {
normal: {
color: '#dc863c',
},
},
data: cityAddress2
}
],
geo: {
map: '河北',
zoom:1.12,
label: {
normal: {
show: true,
position: 'right',
textStyle: {
color: '#d8d8d8',
fontSize:14
}
},
emphasis: {
textStyle: {
color: '#fff',
}
}
},
itemStyle: {
normal: {
borderColor: '#389BB7',
areaColor: '#004878',
},
emphasis: {
areaColor: '#18a8d8',
borderWidth: 0,
}
},
regions: [{
name: firstCity,
itemStyle: {
normal: {
areaColor: '#18a8d8'
}
}
}],
animation: false,
},
};
myChartMap.setOption(option);
