Skip to content

Commit 2ced799

Browse files
committed
update example by pyecharts 2.0.3
1 parent 4215549 commit 2ced799

File tree

243 files changed

+43775
-29646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+43775
-29646
lines changed

BMap/air_quality_baidu_map.html

+41-13
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
<head>
44
<meta charset="UTF-8">
55
<title>Awesome-pyecharts</title>
6-
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/echarts.min.js"></script>
7-
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/bmap.min.js"></script>
8-
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=FAKE_AK"></script>
9-
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&ak=FAKE_AK"></script>
6+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/echarts.min.js"></script>
7+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/bmap.min.js"></script>
8+
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=FAKE_AK"></script>
9+
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&ak=FAKE_AK"></script>
1010

1111
</head>
12-
<body>
13-
<div id="a2d42deec7454c6887ea10adf6d09aa6" class="chart-container" style="width:1200px; height:800px;"></div>
12+
<body >
13+
<div id="a6cba4a7dcb24b2385cb0445a993ab4a" class="chart-container" style="width:1200px; height:800px; "></div>
1414
<script>
15-
var chart_a2d42deec7454c6887ea10adf6d09aa6 = echarts.init(
16-
document.getElementById('a2d42deec7454c6887ea10adf6d09aa6'), 'white', {renderer: 'canvas'});
17-
var option_a2d42deec7454c6887ea10adf6d09aa6 = {
15+
var chart_a6cba4a7dcb24b2385cb0445a993ab4a = echarts.init(
16+
document.getElementById('a6cba4a7dcb24b2385cb0445a993ab4a'), 'white', {renderer: 'canvas'});
17+
var option_a6cba4a7dcb24b2385cb0445a993ab4a = {
1818
"animation": true,
1919
"animationThreshold": 2000,
2020
"animationDuration": 1000,
@@ -23,6 +23,9 @@
2323
"animationDurationUpdate": 300,
2424
"animationEasingUpdate": "cubicOut",
2525
"animationDelayUpdate": 0,
26+
"aria": {
27+
"enabled": false
28+
},
2629
"color": [
2730
"#5470c6",
2831
"#91cc75",
@@ -2345,11 +2348,27 @@
23452348
"data": [
23462349
"pm2.5"
23472350
],
2351+
"selected": {},
23482352
"show": true,
23492353
"padding": 5,
23502354
"itemGap": 10,
23512355
"itemWidth": 25,
2352-
"itemHeight": 14
2356+
"itemHeight": 14,
2357+
"backgroundColor": "transparent",
2358+
"borderColor": "#ccc",
2359+
"borderWidth": 1,
2360+
"borderRadius": 0,
2361+
"pageButtonItemGap": 5,
2362+
"pageButtonPosition": "end",
2363+
"pageFormatter": "{current}/{total}",
2364+
"pageIconColor": "#2f4554",
2365+
"pageIconInactiveColor": "#aaa",
2366+
"pageIconSize": 15,
2367+
"animationDurationUpdate": 800,
2368+
"selector": false,
2369+
"selectorPosition": "auto",
2370+
"selectorItemGap": 7,
2371+
"selectorButtonGap": 10
23532372
}
23542373
],
23552374
"tooltip": {
@@ -2363,14 +2382,20 @@
23632382
"alwaysShowContent": false,
23642383
"showDelay": 0,
23652384
"hideDelay": 100,
2385+
"enterable": false,
2386+
"confine": false,
2387+
"appendToBody": false,
2388+
"transitionDuration": 0.4,
23662389
"textStyle": {
23672390
"fontSize": 14
23682391
},
23692392
"borderWidth": 0,
2370-
"padding": 5
2393+
"padding": 5,
2394+
"order": "seriesAsc"
23712395
},
23722396
"title": [
23732397
{
2398+
"show": true,
23742399
"text": "\u5168\u56fd\u4e3b\u8981\u57ce\u5e02\u7a7a\u6c14\u8d28\u91cf",
23752400
"target": "blank",
23762401
"subtext": "data from PM25.in",
@@ -2379,6 +2404,9 @@
23792404
"left": "center",
23802405
"padding": 5,
23812406
"itemGap": 10,
2407+
"textAlign": "auto",
2408+
"textVerticalAlign": "auto",
2409+
"triggerEvent": false,
23822410
"textStyle": {
23832411
"color": "#fff"
23842412
}
@@ -2525,8 +2553,8 @@
25252553
}
25262554
}
25272555
};
2528-
chart_a2d42deec7454c6887ea10adf6d09aa6.setOption(option_a2d42deec7454c6887ea10adf6d09aa6);
2529-
var bmap = chart_a2d42deec7454c6887ea10adf6d09aa6.getModel().getComponent('bmap').getBMap();
2556+
chart_a6cba4a7dcb24b2385cb0445a993ab4a.setOption(option_a6cba4a7dcb24b2385cb0445a993ab4a);
2557+
var bmap = chart_a6cba4a7dcb24b2385cb0445a993ab4a.getModel().getComponent('bmap').getBMap();
25302558
</script>
25312559
</body>
25322560
</html>

BMap/bmap_base.html

+60-33
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
<head>
44
<meta charset="UTF-8">
55
<title>Awesome-pyecharts</title>
6-
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/echarts.min.js"></script>
7-
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/bmap.min.js"></script>
8-
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=FAKE_AK"></script>
9-
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&ak=FAKE_AK"></script>
6+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/echarts.min.js"></script>
7+
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/bmap.min.js"></script>
8+
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=FAKE_AK"></script>
9+
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&ak=FAKE_AK"></script>
1010

1111
</head>
12-
<body>
13-
<div id="b73b5dd5d7ac47f1912bdc0745b8aae9" class="chart-container" style="width:900px; height:500px;"></div>
12+
<body >
13+
<div id="1e88358f263241cf95969c7495889afc" class="chart-container" style="width:900px; height:500px; "></div>
1414
<script>
15-
var chart_b73b5dd5d7ac47f1912bdc0745b8aae9 = echarts.init(
16-
document.getElementById('b73b5dd5d7ac47f1912bdc0745b8aae9'), 'white', {renderer: 'canvas'});
17-
var option_b73b5dd5d7ac47f1912bdc0745b8aae9 = {
15+
var chart_1e88358f263241cf95969c7495889afc = echarts.init(
16+
document.getElementById('1e88358f263241cf95969c7495889afc'), 'white', {renderer: 'canvas'});
17+
var option_1e88358f263241cf95969c7495889afc = {
1818
"animation": true,
1919
"animationThreshold": 2000,
2020
"animationDuration": 1000,
@@ -23,6 +23,9 @@
2323
"animationDurationUpdate": 300,
2424
"animationEasingUpdate": "cubicOut",
2525
"animationDelayUpdate": 0,
26+
"aria": {
27+
"enabled": false
28+
},
2629
"color": [
2730
"#5470c6",
2831
"#91cc75",
@@ -42,65 +45,64 @@
4245
"symbolSize": 12,
4346
"data": [
4447
{
45-
"name": "\u5e7f\u4e1c",
48+
"name": "\u5e7f\u4e1c\u7701",
4649
"value": [
4750
113.26653,
4851
23.132191,
49-
27
52+
47
5053
]
5154
},
5255
{
53-
"name": "\u5317\u4eac",
56+
"name": "\u5317\u4eac\u5e02",
5457
"value": [
55-
116.407526,
56-
39.90403,
57-
102
58+
116.4,
59+
39.9,
60+
49
5861
]
5962
},
6063
{
61-
"name": "\u4e0a\u6d77",
64+
"name": "\u4e0a\u6d77\u5e02",
6265
"value": [
63-
121.473701,
64-
31.230416,
65-
52
66+
121.47,
67+
31.23,
68+
97
6669
]
6770
},
6871
{
69-
"name": "\u6c5f\u897f",
72+
"name": "\u6c5f\u897f\u7701",
7073
"value": [
7174
115.909228,
7275
28.675696,
73-
43
76+
139
7477
]
7578
},
7679
{
77-
"name": "\u6e56\u5357",
80+
"name": "\u6e56\u5357\u7701",
7881
"value": [
7982
112.98381,
8083
28.112444,
81-
112
84+
81
8285
]
8386
},
8487
{
85-
"name": "\u6d59\u6c5f",
88+
"name": "\u6d59\u6c5f\u7701",
8689
"value": [
8790
120.152791,
8891
30.267446,
89-
48
92+
28
9093
]
9194
},
9295
{
93-
"name": "\u6c5f\u82cf",
96+
"name": "\u6c5f\u82cf\u7701",
9497
"value": [
9598
118.763232,
9699
32.061707,
97-
124
100+
52
98101
]
99102
}
100103
],
101104
"label": {
102105
"show": true,
103-
"position": "top",
104106
"margin": 8,
105107
"formatter": "{b}"
106108
}
@@ -111,11 +113,27 @@
111113
"data": [
112114
"bmap"
113115
],
116+
"selected": {},
114117
"show": true,
115118
"padding": 5,
116119
"itemGap": 10,
117120
"itemWidth": 25,
118-
"itemHeight": 14
121+
"itemHeight": 14,
122+
"backgroundColor": "transparent",
123+
"borderColor": "#ccc",
124+
"borderWidth": 1,
125+
"borderRadius": 0,
126+
"pageButtonItemGap": 5,
127+
"pageButtonPosition": "end",
128+
"pageFormatter": "{current}/{total}",
129+
"pageIconColor": "#2f4554",
130+
"pageIconInactiveColor": "#aaa",
131+
"pageIconSize": 15,
132+
"animationDurationUpdate": 800,
133+
"selector": false,
134+
"selectorPosition": "auto",
135+
"selectorItemGap": 7,
136+
"selectorButtonGap": 10
119137
}
120138
],
121139
"tooltip": {
@@ -129,20 +147,29 @@
129147
"alwaysShowContent": false,
130148
"showDelay": 0,
131149
"hideDelay": 100,
150+
"enterable": false,
151+
"confine": false,
152+
"appendToBody": false,
153+
"transitionDuration": 0.4,
132154
"formatter": function (params) { return params.name + ' : ' + params.value[2]; },
133155
"textStyle": {
134156
"fontSize": 14
135157
},
136158
"borderWidth": 0,
137-
"padding": 5
159+
"padding": 5,
160+
"order": "seriesAsc"
138161
},
139162
"title": [
140163
{
164+
"show": true,
141165
"text": "BMap-\u57fa\u672c\u793a\u4f8b",
142166
"target": "blank",
143167
"subtarget": "blank",
144168
"padding": 5,
145-
"itemGap": 10
169+
"itemGap": 10,
170+
"textAlign": "auto",
171+
"textVerticalAlign": "auto",
172+
"triggerEvent": false
146173
}
147174
],
148175
"bmap": {
@@ -153,8 +180,8 @@
153180
"roam": true
154181
}
155182
};
156-
chart_b73b5dd5d7ac47f1912bdc0745b8aae9.setOption(option_b73b5dd5d7ac47f1912bdc0745b8aae9);
157-
var bmap = chart_b73b5dd5d7ac47f1912bdc0745b8aae9.getModel().getComponent('bmap').getBMap();
183+
chart_1e88358f263241cf95969c7495889afc.setOption(option_1e88358f263241cf95969c7495889afc);
184+
var bmap = chart_1e88358f263241cf95969c7495889afc.getModel().getComponent('bmap').getBMap();
158185
</script>
159186
</body>
160187
</html>

0 commit comments

Comments
 (0)