From d8723a3d9e0b7a392a6925187b3ef9c068c34c36 Mon Sep 17 00:00:00 2001 From: Jeena Date: Sun, 22 Sep 2013 19:28:13 +0200 Subject: [PATCH] fixed #19 --- js/App.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/App.js b/js/App.js index 4c67fef..303040f 100644 --- a/js/App.js +++ b/js/App.js @@ -249,6 +249,16 @@ App.prototype.updatePieChart = function() { ctx.fill(); lastend += Math.PI*2*(data[i]/myTotal); } + + if(all > 0) { + ctx.font = "12px FeuraSans, sans-serif"; + ctx.fillStyle = "#fff"; + ctx.textAlign = "center"; + var text = unread + "/" + all; + var x = canvas.width / 2; + var y = canvas.height / 2 + 4; + ctx.fillText(text, x, y, canvas.width-6); + } }) };