Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readers.py
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-02-13 23:41:10 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-02-13 23:41:10 (GMT)
commitc6c7743e7c66912c61f2e9ef7df7b4f8943cbdf1 (patch)
tree534533917a69c65d4e0492a12f902e304c2aecd0 /readers.py
parentd187afec8d42af8c7cc27cfd6c40f6c11babe99e (diff)
Graph the times of the stopwatchs
Diffstat (limited to 'readers.py')
-rw-r--r--readers.py13
1 files changed, 13 insertions, 0 deletions
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