-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (45 loc) · 1.78 KB
/
index.html
File metadata and controls
52 lines (45 loc) · 1.78 KB
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
<!DOCTYPE html>
<html ng-app="angularjs-starter">
<head>
<title>Angular ChartJs Line Directive</title>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" />
<script src="Chart.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script src="angular-chartjs-line-directive.js"></script>
<script>
var app = angular.module('angularjs-starter', ['angular.directives-chartjs-line']);
app.controller('MainCtrl', function($scope) {
$scope.lineData = {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
data : [65,59,90,81,56,55,40]
},
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
data : [28,48,40,19,96,27,100]
}
]
}
});
</script>
</head>
<body ng-controller="MainCtrl">
<h1>AngularJS Chart.js Line Directive</h1>
<p>Have a look at the source code to see an example.</p>
<ang:chartjs:line data-chartjs-model="lineData"
data-chartjs-width="800"
data-chartjs-height="400"
data-chartjs-bezier-curve="false"
data-chartjs-scale-show-labels="true"
data-chartjs-animation-steps="30">
</ang:chartjs:line>
</body>
</html>