Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Klaehn
401be97073 bicycle-statistics: add accumulated distances view 2019-06-19 10:32:11 +02:00

View File

@ -112,6 +112,7 @@ class Gpx2Html(object):
distances.append(self.tracks.distances(year))
distances_dict[year] = self.tracks.distances(year)
avg_speeds.append(self.tracks.avg_speeds(year))
self.logger.info("{}: {}".format(year, self.tracks.distances))
plot_bar_chart(self.tracks.years(), MONTH_LABELS, distances,
'Distance', 'Month', 'km',
@ -133,8 +134,7 @@ class Gpx2Html(object):
current_year = datetime.datetime.today().year
current_month = datetime.datetime.today().month
current_year_distance = list()
self.logger.info("Current month: %s", current_month)
for i in range(0, current_month + 1):
for i in range(0, current_month):
current_year_distance.append(accumulated_distances[current_year][i])
accumulated_distances[current_year] = current_year_distance