Skip to content

Commit c8c5dc3

Browse files
author
Christoph Wolfes
committed
added legend options to pie chart
1 parent f669b10 commit c8c5dc3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/charts/commitsByAuthor.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ angular.module('adf.widget.scm')
4040
data[author]= entry.count;
4141
});
4242

43+
var options = {
44+
legend: {
45+
display: true,
46+
position: "bottom"
47+
}
48+
};
49+
4350
var chart = {
4451
labels: [],
4552
data: [],
4653
series: ["Commits"],
47-
class: "chart-pie"
54+
class: "chart-pie",
55+
options: options
4856
};
4957

5058
angular.forEach(data, function (count, author) {

src/charts/pie-chart.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div ng-if="vm.chart">
66
<canvas id="pie" class="chart chart-pie"
77
chart-legend="true" chart-data="vm.chart.data"
8-
chart-labels="vm.chart.labels">
8+
chart-labels="vm.chart.labels" chart-options="vm.chart.options">
99
</canvas>
1010
</div>
1111
</div>

0 commit comments

Comments
 (0)