Sync to trunk

This commit is contained in:
John Schember 2009-02-14 08:04:04 -05:00
commit d633231cd4

View File

@ -197,6 +197,7 @@ class Server(object):
def calculate_month_trend(self, days=31): def calculate_month_trend(self, days=31):
stats = self.get_slice(date.today()-timedelta(days=days-1), date.today()) stats = self.get_slice(date.today()-timedelta(days=days-1), date.today())
fig = plt.figure(2, (12, 4), 96)#, facecolor, edgecolor, frameon, FigureClass) fig = plt.figure(2, (12, 4), 96)#, facecolor, edgecolor, frameon, FigureClass)
fig.clear()
ax = fig.add_subplot(111) ax = fig.add_subplot(111)
x = list(range(days-1, -1, -1)) x = list(range(days-1, -1, -1))
y = stats.daily_totals y = stats.daily_totals
@ -235,6 +236,7 @@ Donors per day: %(dpd).2f
y = [m.total for m in _months] y = [m.total for m in _months]
ml = mdates.MonthLocator() # every month ml = mdates.MonthLocator() # every month
fig = plt.figure(1, (8, 4), 96)#, facecolor, edgecolor, frameon, FigureClass) fig = plt.figure(1, (8, 4), 96)#, facecolor, edgecolor, frameon, FigureClass)
fig.clear()
ax = fig.add_subplot(111) ax = fig.add_subplot(111)
average = sum(y)/len(y) average = sum(y)/len(y)
ax.bar(x, y, align='center', width=20, color='g') ax.bar(x, y, align='center', width=20, color='g')