Fork me on GitHub

echarts4河北省地图

我的网盘----平复-----总结版本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);

  

posted @ 2018-01-31 14:05  森海轮回  阅读(3606)  评论(0编辑  收藏  举报