diff options
author | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-02-13 23:41:10 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-02-13 23:41:10 (GMT) |
commit | c6c7743e7c66912c61f2e9ef7df7b4f8943cbdf1 (patch) | |
tree | 534533917a69c65d4e0492a12f902e304c2aecd0 /readers.py | |
parent | d187afec8d42af8c7cc27cfd6c40f6c11babe99e (diff) |
Graph the times of the stopwatchs
Diffstat (limited to 'readers.py')
-rw-r--r-- | readers.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |