forked from echarts-maps/echarts-china-cities-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.js
45 lines (45 loc) · 749 Bytes
/
demo.js
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
function make_city(cityname, dom_id){
achart = echarts.init(document.getElementById(dom_id));
var option = {
"title": [
{
"textStyle": {
"color": "#000",
"fontSize": 18
},
"subtext": "",
"text": cityname,
"top": "auto",
"subtextStyle": {
"color": "#aaa",
"fontSize": 12
},
"left": "auto"
}
],
"legend": [
{
"selectedMode": "multiple",
"top": "top",
"orient": "horizontal",
"data": [
""
],
"left": "center",
"show": true
}
],
"backgroundColor": "#fff",
"series": [
{
"mapType": cityname,
"data": [],
"name": "",
"symbol": "circle",
"type": "map",
"roam": true
}
]
};
achart.setOption(option);
}