From c6c7743e7c66912c61f2e9ef7df7b4f8943cbdf1 Mon Sep 17 00:00:00 2001 From: Agustin Zubiaga Date: Mon, 13 Feb 2012 23:41:10 +0000 Subject: Graph the times of the stopwatchs --- (limited to 'readers.py') diff --git a/readers.py b/readers.py index 7c87fdb..2b0f269 100644 --- a/readers.py +++ b/readers.py @@ -47,3 +47,16 @@ class StopWatch(): chart_data.append((str(marks_count), i)) return chart_data + + def times_to_chart_data(self): + times = [i[0][0] for i in self.data[2]] + + times_count = 0 + chart_data = [] + + for i in times: + times_count += 1 + chart_data.append((self.get_stopwatch_name(times_count - 1), + round(i, 2))) + + return chart_data -- cgit v0.9.1