2
schangxiang@126.com
2024-08-16 b47c50a2a514def7374b32d7194b2c599cba5625
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function option0 (name) {
    var color = eColorMap[name];
    var option = {
        title : {
            text: '空气质量('+name+')',
            subtext: 'data from PM25.in',
            sublink: 'http://www.pm25.in'
        },
        tooltip : {
            trigger: 'item'
        },
        toolbox: {
            show : true,
            //orient : 'vertical',
            x: 'right',
            //y: 'center',
            feature : {
                mark : {show: true},
                dataView : {show: true, readOnly: false},
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        dataRange: {
            min : data[name + 'Min'],
            max : data[name + 'Max'],
            calculable : true,
            color: ['maroon','purple','red','orange','yellow','lightgreen']
        },
        series : [
            {
                type: 'map',
                mapType: 'china',
                mapLocation: {
                    //x:'left'
                },
                hoverable: false,
                roam:true,
                itemStyle:{
                    //normal:{label:{show:true}}
                },
                data : [],
                markPoint: {
                    symbolSize: 5,       // 标注大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
                    itemStyle: {
                        normal: {
                            borderColor: '#87cefa',
                            borderWidth: 1,            // 标注边线线宽,单位px,默认为1
                            label: {
                                show: false
                            }
                        },
                        emphasis: {
                            borderColor: '#1e90ff',
                            borderWidth: 5,
                            label: {
                                show: false
                            }
                        }
                    },
                    data : data[name]
                },
                geoCoord : data.geoCoord
            }
        ]
    };
    return option;
}