Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Klaehn
af1b4ff9d8 bicycle-statistics: add accumulated distances view 2019-06-19 11:00:18 +02:00

View File

@ -112,7 +112,6 @@ 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',
@ -134,7 +133,8 @@ class Gpx2Html(object):
current_year = datetime.datetime.today().year
current_month = datetime.datetime.today().month
current_year_distance = list()
for i in range(0, current_month):
self.logger.info("Current month: %s", current_month)
for i in range(0, current_month + 1):
current_year_distance.append(accumulated_distances[current_year][i])
accumulated_distances[current_year] = current_year_distance