diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-02-16 17:16:02 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-02-16 17:16:02 +0100 |
commit | f0ea44eb0eab0633bdd2314700a41824bfcaed6e (patch) | |
tree | 799ad4343d31948319a74ac4afdc6d0717f3f248 | |
parent | 68b3e20ecb4d405c6f7b943c0613787eae3734a1 (diff) |
Add total number of builds inside pie chart.
* Draw via SVG the total number of build reports inside
the pie chart.
Change-Id: I79cea7c8d9df65ac49e7ccb9f6117ce619a83b74
-rw-r--r-- | app/dashboard/static/js/linaro-builds-job-kernel-1.0.8.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/dashboard/static/js/linaro-builds-job-kernel-1.0.8.js b/app/dashboard/static/js/linaro-builds-job-kernel-1.0.8.js index ad8bf23..84b89fa 100644 --- a/app/dashboard/static/js/linaro-builds-job-kernel-1.0.8.js +++ b/app/dashboard/static/js/linaro-builds-job-kernel-1.0.8.js @@ -104,6 +104,22 @@ function createPieChart(data) { return color[i]; }) .attr('d', arc); + + svg.append('text') + .attr('dy', '0em') + .style('text-anchor', 'middle') + .attr('class', 'pie-chart-inside') + .text(function(d) { + return len; + }); + + svg.append('text') + .attr('dy', '1.5em') + .style('text-anchor', 'middle') + .attr('class', 'pie-chart-data') + .text(function(d) { + return 'total builds'; + }); } $('#success-cell') |