Subversion Repositories php-qbpwcf

Rev

Rev 23 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 liveuser 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
 
4
    <head>
5
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
        <title>amMap example</title>
7
        <link href='http://fonts.googleapis.com/css?family=Covered+By+Your+Grace' rel='stylesheet' type='text/css'>
8
        <link rel="stylesheet" href="../ammap/ammap.css" type="text/css">
9
        <link rel="stylesheet" href="style.css" type="text/css">
10
 
11
        <script src="../ammap/ammap.js" type="text/javascript"></script>
12
        <!-- map file should be included after ammap.js -->
13
		<script src="../ammap/maps/js/worldLow.js" type="text/javascript"></script>
14
        <!-- theme files. you only need to include the theme you use.
15
             feel free to modify themes and create your own themes -->
16
        <script src="../ammap/themes/light.js" type="text/javascript"></script>
17
        <script src="../ammap/themes/dark.js" type="text/javascript"></script>
18
        <script src="../ammap/themes/black.js" type="text/javascript"></script>
19
        <script src="../ammap/themes/chalk.js" type="text/javascript"></script>
20
 
21
        <script>
22
 
23
         // in order to set theme for a chart, all you need to include theme file
24
         // located in amcharts/themes folder and set theme property for the chart.
25
 
26
        var map;
27
        makeMap("light", "#FFFFFF");
28
 
29
        // Theme can only be applied when creating chart instance - this means
30
        // that if you need to change theme at run time, youhave to create whole
31
        // chart object once again.
32
 
33
        function makeMap(theme, bgColor, bgImage) {
34
 
35
        	if (map) {
36
        		map.clear();
37
        	}
38
 
39
        	// background
40
        	if(document.body){
41
	        	document.body.style.backgroundColor = bgColor;
42
	        	document.body.style.backgroundImage = "url(" + bgImage + ")";
43
        	}
44
 
45
        	map = AmCharts.makeChart("mapdiv", {
46
        		type: "map",
47
        		theme: theme,
48
 
49
                creditsPosition: "top-right",
50
 
51
        		dataProvider: {
52
        			map: "worldLow",
53
        			zoomLevel: 3.5,
54
        			zoomLongitude: 10,
55
        			zoomLatitude: 52,
56
        			areas: [{
57
        					title: "Austria",
58
        					id: "AT",
59
        					color: "#3366CC",
60
        					customData: "1995",
61
        					groupId: "before2004"
62
        				}, {
63
        					title: "Ireland",
64
        					id: "IE",
65
        					color: "#3366CC",
66
        					customData: "1973",
67
        					groupId: "before2004"
68
        				}, {
69
        					title: "Denmark",
70
        					id: "DK",
71
        					color: "#3366CC",
72
        					customData: "1973",
73
        					groupId: "before2004"
74
        				}, {
75
        					title: "Finland",
76
        					id: "FI",
77
        					color: "#3366CC",
78
        					customData: "1995",
79
        					groupId: "before2004"
80
        				}, {
81
        					title: "Sweden",
82
        					id: "SE",
83
        					color: "#3366CC",
84
        					customData: "1995",
85
        					groupId: "before2004"
86
        				}, {
87
        					title: "Great Britain",
88
        					id: "GB",
89
        					color: "#3366CC",
90
        					customData: "1973",
91
        					groupId: "before2004"
92
        				}, {
93
        					title: "Italy",
94
        					id: "IT",
95
        					color: "#3366CC",
96
        					customData: "1957",
97
        					groupId: "before2004"
98
        				}, {
99
        					title: "France",
100
        					id: "FR",
101
        					color: "#3366CC",
102
        					customData: "1957",
103
        					groupId: "before2004"
104
        				}, {
105
        					title: "Spain",
106
        					id: "ES",
107
        					color: "#3366CC",
108
        					customData: "1986",
109
        					groupId: "before2004"
110
        				}, {
111
        					title: "Greece",
112
        					id: "GR",
113
        					color: "#3366CC",
114
        					customData: "1981",
115
        					groupId: "before2004"
116
        				}, {
117
        					title: "Germany",
118
        					id: "DE",
119
        					color: "#3366CC",
120
        					customData: "1957",
121
        					groupId: "before2004"
122
        				}, {
123
        					title: "Belgium",
124
        					id: "BE",
125
        					color: "#3366CC",
126
        					customData: "1957",
127
        					groupId: "before2004"
128
        				}, {
129
        					title: "Luxembourg",
130
        					id: "LU",
131
        					color: "#3366CC",
132
        					customData: "1957",
133
        					groupId: "before2004"
134
        				}, {
135
        					title: "Netherlands",
136
        					id: "NL",
137
        					color: "#3366CC",
138
        					customData: "1957",
139
        					groupId: "before2004"
140
        				}, {
141
        					title: "Portugal",
142
        					id: "PT",
143
        					color: "#3366CC",
144
        					customData: "1986",
145
        					groupId: "before2004"
146
        				}, {
147
        					title: "Lithuania",
148
        					id: "LT",
149
        					color: "#FFCC33",
150
        					customData: "2004",
151
        					groupId: "2004"
152
        				}, {
153
        					title: "Latvia",
154
        					id: "LV",
155
        					color: "#FFCC33",
156
        					customData: "2004",
157
        					groupId: "2004"
158
        				}, {
159
        					title: "Czech Republic ",
160
        					id: "CZ",
161
        					color: "#FFCC33",
162
        					customData: "2004",
163
        					groupId: "2004"
164
        				}, {
165
        					title: "Slovakia",
166
        					id: "SK",
167
        					color: "#FFCC33",
168
        					customData: "2004",
169
        					groupId: "2004"
170
        				}, {
171
        					title: "Slovenia",
172
        					id: "SI",
173
        					color: "#FFCC33",
174
        					customData: "2004",
175
        					groupId: "2004"
176
        				}, {
177
        					title: "Estonia",
178
        					id: "EE",
179
        					color: "#FFCC33",
180
        					customData: "2004",
181
        					groupId: "2004"
182
        				}, {
183
        					title: "Hungary",
184
        					id: "HU",
185
        					color: "#FFCC33",
186
        					customData: "2004",
187
        					groupId: "2004"
188
        				}, {
189
        					title: "Cyprus",
190
        					id: "CY",
191
        					color: "#FFCC33",
192
        					customData: "2004",
193
        					groupId: "2004"
194
        				}, {
195
        					title: "Malta",
196
        					id: "MT",
197
        					color: "#FFCC33",
198
        					customData: "2004",
199
        					groupId: "2004"
200
        				}, {
201
        					title: "Poland",
202
        					id: "PL",
203
        					color: "#FFCC33",
204
        					customData: "2004",
205
        					groupId: "2004"
206
        				}, {
207
        					title: "Romania",
208
        					id: "RO",
209
        					color: "#66CC99",
210
        					customData: "2007",
211
        					groupId: "2007"
212
        				}, {
213
        					title: "Bulgaria",
214
        					id: "BG",
215
        					color: "#66CC99",
216
        					customData: "2007",
217
        					groupId: "2007"
218
        				}
219
        			]
220
        		},
221
 
222
        		areasSettings: {
223
        			balloonText: "[[title]] joined EU at [[customData]]"
224
        		},
225
 
226
 
227
        		legend: {
228
        			width: "100%",
229
        			bottom: 15,
230
        			left: 15,
231
        			horizontalGap: 10,
232
        			data: [{
233
        				title: "Joined EU before 2004",
234
        				color: "#3366CC"
235
        			}, {
236
        				title: "Joined EU at 2004",
237
        				color: "#FFCC33"
238
        			}, {
239
        				title: "Joined EU at 2007",
240
        				color: "#66CC99"
241
        			}]
242
        		}
243
 
244
        	});
245
        }
246
 
247
        </script>
248
    </head>
249
 
250
    <body style="font-size:15px;">Select theme:
251
        <a href="#" onclick="makeMap('light', '#ffffff');">Light</a> |
252
        <a href="#" onclick="makeMap('dark', '#282828')">Dark</a> |
253
        <a href="#" onclick="makeMap('black', '#222222')">Black</a> |
254
        <a href="#" onclick="makeMap('chalk', '#282828', 'images/board.jpg')">Chalk</a>
255
        <br><br>
256
        <div id="mapdiv" style="width: 800px; height: 500px;"></div>
257
    </body>
258
 
259
</html>