forked from wjutsum/AngularJS-data-driven-SVG-map-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (51 loc) · 1.89 KB
/
index.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Data Responsive SVG Map</title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/main.css"/>
</head>
<body ng-app="SvgMapApp" ng-controller="MainCtrl">
<div class="container">
<h2>Angular JS Data Responsive SVG Map</h2>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel panel-body">
<div svg-map></div>
<div class="scale">
<div ng-repeat="n in [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0]"
ng-style="{backgroundColor:'{{n | map_colour}}'}">{{n}}
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<p>
<button ng-click="createDummyData()" class="btn btn-block btn-default">Create Dummy Data</button>
</p>
<div class="panel panel-default">
<div class="panel panel-body">
<div class="regionlist">
<div ng-repeat="(key,region) in dummyData"
ng-class="{active:hoverRegion==key}"
ng-mouseover="changeHoverRegion(key)">
<div>{{key}}</div>
<div>{{region.value | number}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/angular.js"></script>
<script src="js/controllers.js"></script>
<script src="js/directives.js"></script>
<script src="js/filters.js"></script>
</body>
</html>