From b47275599b2e619e0b148ef276e9a6c851b9c8b3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 30 Mar 2011 21:11:03 +0900 Subject: [PATCH] fix selective on some graphs; tweak pie layout --- anki/graphs.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/anki/graphs.py b/anki/graphs.py index 872af86f4..d385684de 100644 --- a/anki/graphs.py +++ b/anki/graphs.py @@ -46,7 +46,7 @@ class Graphs(object): h1 { margin-bottom: 0; margin-top: 1em; } body { font-size: 14px; } table * { font-size: 14px; } -.pielabel { text-align:center; padding:2px; color:black; } +.pielabel { text-align:center; padding:2px; color:white; } """ @@ -405,8 +405,7 @@ sum(case when queue=2 and ivl >= 21 then 1 else 0 end), -- mtr sum(case when queue=1 or (queue=2 and ivl < 21) then 1 else 0 end), -- yng/lrn sum(case when queue=0 then 1 else 0 end), -- new sum(case when queue=-1 then 1 else 0 end) -- susp -%s -from cards""" % self._limit()) +from cards where 1 %s""" % self._limit()) # Tools ###################################################################### @@ -443,11 +442,11 @@ from cards""" % self._limit()) ylabel = "" conf['series']['pie'] = dict( show=True, - radius=0.8, - stroke=dict(color="#000", width=3), + radius=1, + stroke=dict(color="#fff", width=5), label=dict( show=True, - radius=1, + radius=0.7, threshold=0.01)) #conf['legend'] = dict(show=False) @@ -471,7 +470,7 @@ $(function () { } if (conf.series.pie) { conf.series.pie.label.formatter = function(label, series){ - return '
'+''+label+'
'+Math.round(series.percent)+'%%
'; + return '
'+Math.round(series.percent)+'%%
'; }; } $.plot($("#%(id)s"), %(data)s, conf);