mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 12:24:00 +02:00
Sync to trunk
This commit is contained in:
commit
d633231cd4
1 changed files with 2 additions and 0 deletions
|
|
@ -197,6 +197,7 @@ def __init__(self, apache=False, root='/', data_file='/tmp/donations.xml'):
|
|||
def calculate_month_trend(self, days=31):
|
||||
stats = self.get_slice(date.today()-timedelta(days=days-1), date.today())
|
||||
fig = plt.figure(2, (12, 4), 96)#, facecolor, edgecolor, frameon, FigureClass)
|
||||
fig.clear()
|
||||
ax = fig.add_subplot(111)
|
||||
x = list(range(days-1, -1, -1))
|
||||
y = stats.daily_totals
|
||||
|
|
@ -235,6 +236,7 @@ def months(start, end):
|
|||
y = [m.total for m in _months]
|
||||
ml = mdates.MonthLocator() # every month
|
||||
fig = plt.figure(1, (8, 4), 96)#, facecolor, edgecolor, frameon, FigureClass)
|
||||
fig.clear()
|
||||
ax = fig.add_subplot(111)
|
||||
average = sum(y)/len(y)
|
||||
ax.bar(x, y, align='center', width=20, color='g')
|
||||
|
|
|
|||
Loading…
Reference in a new issue