diff --git a/aqt/overview.py b/aqt/overview.py index fc5657471..33a5407c9 100644 --- a/aqt/overview.py +++ b/aqt/overview.py @@ -94,11 +94,9 @@ $(function () { var d = %(fcdata)s; if (d) { $.plot($("#placeholder"), [ - { data: d[0], bars: { show: true, barWidth: 0.8, align:"center" }, color: "#0c0"}, - { data: d[1], color: "#000", lines: { show: true }, yaxis: 2 } + { data: d, bars: { show: true, barWidth: 0.8 }, color: "#0c0" } ], { - xaxis: { ticks: [[0, "Today"], [6, "7 days"], [13, "14 days"]] }, - yaxes: [{}, {position: "right"}] + xaxis: { ticks: [[0.4, "Today"]] } }); } else { $("#placeholder").hide(); @@ -169,14 +167,7 @@ $(function () { fc = self.mw.deck.sched.dueForecast(14) if not sum(fc): return "''" - tot = 0 - repd = [] - totd = [] - for (c, cnt) in enumerate(fc): - tot += cnt - repd.append((c, cnt)) - totd.append((c, tot)) - return simplejson.dumps([repd, totd]) + return simplejson.dumps(tuple(enumerate(fc))) # Toolbar ##########################################################################