pad ivl graph

This commit is contained in:
Damien Elmes 2011-03-31 13:54:29 +09:00
parent 9705dbdcfe
commit dba04598ae

View file

@ -317,11 +317,7 @@ group by day order by day""" % lim,
def _daysStudied(self): def _daysStudied(self):
lims = [] lims = []
num = None num = self._periodDays()
if self.type == 0:
num = 30
elif self.type == 1:
num = 7*52
if num: if num:
lims.append( lims.append(
"time > %d" % "time > %d" %
@ -359,6 +355,7 @@ group by day order by day)""" % lim,
dict(data=totd, color=colCum, label=_("% Total"), yaxis=2, dict(data=totd, color=colCum, label=_("% Total"), yaxis=2,
bars={'show': False}, lines=dict(show=True), stack=False) bars={'show': False}, lines=dict(show=True), stack=False)
], conf=dict( ], conf=dict(
xaxis=dict(min=-0.5, max=ivls[-1][0]+0.5),
yaxes=[dict(), dict(position="right", max=105)])) yaxes=[dict(), dict(position="right", max=105)]))
i = [] i = []
self._line(i, _("Average interval"), fmtTimeSpan(avg*86400)) self._line(i, _("Average interval"), fmtTimeSpan(avg*86400))