-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathchartContoller.js
More file actions
68 lines (58 loc) · 1.74 KB
/
chartContoller.js
File metadata and controls
68 lines (58 loc) · 1.74 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
'use strict';
/**
* @ngdoc function
* @name sbAdminApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the sbAdminApp
*/
angular.module('sbAdminApp')
.controller('ChartCtrl', ['$scope', '$timeout', function($scope, $timeout) {
$scope.line = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
series: ['Series A', 'Series B'],
data: [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
],
onClick: function(points, evt) {
console.log(points, evt);
}
};
$scope.bar = {
labels: ['2006', '2007', '2008', '2009', '2010', '2011', '2012'],
series: ['Series A', 'Series B'],
data: [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
]
};
$scope.donut = {
labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales"],
data: [300, 500, 100]
};
$scope.radar = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
data: [
[65, 59, 90, 81, 56, 55, 40],
[28, 48, 40, 19, 96, 27, 100]
]
};
$scope.pie = {
labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales"],
data: [300, 500, 100]
};
$scope.polar = {
labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales", "Tele Sales", "Corporate Sales"],
data: [300, 500, 100, 40, 120]
};
$scope.dynamic = {
labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales", "Tele Sales", "Corporate Sales"],
data: [300, 500, 100, 40, 120],
type: 'PolarArea',
toggle: function() {
this.type = this.type === 'PolarArea' ?
'Pie' : 'PolarArea';
}
};
}]);