Skip to content

Commit eaba409

Browse files
committed
Merge pull request #101 from jeff-phillips-18/master
Update example code for c3-chart directive
2 parents e8720de + 5d8227d commit eaba409

File tree

2 files changed

+48
-28
lines changed

2 files changed

+48
-28
lines changed

dist/angular-patternfly.js

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -407,22 +407,32 @@ angular.module('patternfly.card').directive('pfCard', function () {
407407
$scope.available = $scope.total - $scope.used;
408408
409409
$scope.chartConfig = {
410-
"donut": {
411-
"title":"MHz Used",
412-
"label":{"show":false},
413-
"width":10
410+
type: "donut",
411+
donut: {
412+
title: "MHz Used",
413+
label: {show: false},
414+
width: 10
414415
},
415-
"size": {"height":130},
416-
"legend": {"show":false},
417-
"color": {"pattern":["#0088CE","#D1D1D1"]},
418-
"tooltip": {},
419-
"data": {"columns":[["Used","950"],["Available",50]],
420-
"type": "donut",
421-
"donut": {
422-
"label": {"show":false}
416+
size: {
417+
height: 130
423418
},
424-
"groups": [["used","available"]],
425-
"order":null
419+
legend: {
420+
show: false
421+
},
422+
color: {
423+
pattern: ["#0088CE","#D1D1D1"]
424+
},
425+
tooltip: {},
426+
data: {
427+
type: "donut",
428+
columns: [
429+
["Used", $scope.used],
430+
["Available", $scope.total - $scope.used]
431+
],
432+
groups: [
433+
["used", "available"]
434+
],
435+
order: null
426436
}
427437
};
428438

src/charts/c3/c3-chart.directive.js

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,32 @@
3737
$scope.available = $scope.total - $scope.used;
3838
3939
$scope.chartConfig = {
40-
"donut": {
41-
"title":"MHz Used",
42-
"label":{"show":false},
43-
"width":10
40+
type: "donut",
41+
donut: {
42+
title: "MHz Used",
43+
label: {show: false},
44+
width: 10
4445
},
45-
"size": {"height":130},
46-
"legend": {"show":false},
47-
"color": {"pattern":["#0088CE","#D1D1D1"]},
48-
"tooltip": {},
49-
"data": {"columns":[["Used","950"],["Available",50]],
50-
"type": "donut",
51-
"donut": {
52-
"label": {"show":false}
46+
size: {
47+
height: 130
5348
},
54-
"groups": [["used","available"]],
55-
"order":null
49+
legend: {
50+
show: false
51+
},
52+
color: {
53+
pattern: ["#0088CE","#D1D1D1"]
54+
},
55+
tooltip: {},
56+
data: {
57+
type: "donut",
58+
columns: [
59+
["Used", $scope.used],
60+
["Available", $scope.total - $scope.used]
61+
],
62+
groups: [
63+
["used", "available"]
64+
],
65+
order: null
5666
}
5767
};
5868

0 commit comments

Comments
 (0)