Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/charts.py
diff options
context:
space:
mode:
Diffstat (limited to 'charts.py')
-rw-r--r--charts.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/charts.py b/charts.py
index 25f21a4..014dc51 100644
--- a/charts.py
+++ b/charts.py
@@ -30,8 +30,6 @@ import gobject
from sugar.activity import activity
-CHART_IMAGE = os.path.join(activity.get_activity_root(), "tmp", "chart.png")
-
class Chart(gobject.GObject):
def __init__(self, type="vertical", width=600, height=460):
@@ -127,7 +125,6 @@ class Chart(gobject.GObject):
chart.addDataset(self.dataSet)
chart.render()
- def as_png(self):
+ def as_png(self, file):
'''Save the chart as png image'''
- self.surface.write_to_png(CHART_IMAGE)
- return CHART_IMAGE
+ self.surface.write_to_png(file)