forked from clemsos/d3-china-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
65 lines (58 loc) · 2 KB
/
example.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
.provinces {
background-color: #fff;
border: 1px solid #ccc;
}
.hk {
position:relative;
left:-750px;
top:0px;
}
/*
.background {
fill: none;
pointer-events: all;
}
.province {
fill: #cde;
stroke: #fff;
stroke-linejoin: round;
stroke-linecap: round;
}
*/
/*#provinces .active, #states .active {
fill: #89a;
}
#cities {
stroke-width: 0;
}
.city {
fill: #345;
stroke: #fff;
}
pre.prettyprint {
border: 1px solid #ccc;
margin-bottom: 0;
padding: 9.5px;
}*/
</style>
</head>
<body>
<div id="map"></div>
<script src="//d3js.org/d3.v3.min.js"></script>
<script src="//d3js.org/queue.v1.min.js"></script>
<script src="//d3js.org/topojson.v1.min.js"></script>
<script>
// MAP setup
var width = 800,
height = 550;
// data goes here
var data=[["Gansu",48],["Qinghai",47],["Guangxi",45],["Guizhou",35],["Chongqing",34],["Beijing",12],["Fujian",35],["Anhui",6],["Guangdong",40],["Xizang",3],["Xinjiang",12],["Hainan",21],["Ningxia",8],["Shaanxi",40],["Shanxi",11],["Hubei",1],["Hunan",23],["Sichuan",19],["Yunnan",19],["Hebei",34],["Henan",20],["Liaoning",14],["Shandong",0],["Tianjin",12],["Jiangxi",20],["Jiangsu",37],["Shanghai",34],["Zhejiang",46],["Jilin",38],["Inner Mongol",10],["Heilongjiang",20],["Taiwan",45],["Xianggang",35],["Macau",10]];var title='Population of Sina Weibo users for a specific keyword';var desc='Based on Sina Weibo user profiles during a period of time. Data from weiboscope.';var credits='by Clement Renaud - 2013';var units='Volume of tweets';
</script>
<script src="d3map.js"></script>
</body>
</html>