Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguzubiaga97@gmail.com>2012-01-23 16:03:35 (GMT)
committer Agustin Zubiaga <aguzubiaga97@gmail.com>2012-01-23 16:03:35 (GMT)
commit068efab7e2fcf028c262d032139340756ccda869 (patch)
treebdcb9294991351536e134354ecc9cd352d55ab98
parent2d3266e0ff6c20ad65cc8b0ea842097276e2a5a8 (diff)
Line charts and pie charts, chart color option
-rw-r--r--activity.py160
-rw-r--r--charts.py46
-rw-r--r--icons/hbar.svg28
-rwxr-xr-xicons/line.svg72
-rw-r--r--icons/pie.svg105
-rw-r--r--pycha/__init__.pyobin178 -> 178 bytes
-rw-r--r--pycha/bar.pyobin11625 -> 11625 bytes
-rw-r--r--pycha/chart.pyobin24966 -> 24966 bytes
-rw-r--r--pycha/color.pyobin5806 -> 5806 bytes
-rw-r--r--pycha/pie.pyobin10925 -> 10925 bytes
-rw-r--r--pycha/utils.pyobin704 -> 704 bytes
11 files changed, 336 insertions, 75 deletions
diff --git a/activity.py b/activity.py
index 5e5afaa..77b17c7 100644
--- a/activity.py
+++ b/activity.py
@@ -28,7 +28,13 @@ from sugar.activity.widgets import StopButton
from sugar.graphics.toolbarbox import ToolbarBox
from sugar.graphics.toolbutton import ToolButton
-from charts import BarChart
+from pycha.color import basicColors as basic_colors
+
+from charts import Chart
+
+COLOR1 = gtk.gdk.Color("#224565")
+COLOR2 = gtk.gdk.Color("#C0C0C0")
+COLOR3 = gtk.gdk.Color("#D1E5EC")
class SimpleGraph(activity.Activity):
@@ -41,11 +47,12 @@ class SimpleGraph(activity.Activity):
# CHART_OPTIONS
- self.x_label = None
- self.y_label = None
- self.chart_title = None
- self.chart_color = None
- self.chart_line_color = None
+ self.x_label = ""
+ self.y_label = ""
+ self.chart_title = ""
+ self.bg_color = "#C0C0C0"
+ self.chart_color = '#224565'
+ self.chart_line_color = "#D1E5EC"
self.current_chart = None
self.chart_data = []
@@ -61,6 +68,12 @@ class SimpleGraph(activity.Activity):
self.toolbarbox.toolbar.insert(self.add_v, -1)
+ self.remove_v = ToolButton("gtk-remove")
+ self.remove_v.connect("clicked", self.remove_value)
+ self.remove_v.set_tooltip("Remove the selected value")
+
+ #self.toolbarbox.toolbar.insert(self.remove_v, -1)
+
separator = gtk.SeparatorToolItem()
separator.set_draw(False)
separator.set_expand(True)
@@ -68,7 +81,7 @@ class SimpleGraph(activity.Activity):
self.add_vbar_chart = ToolButton("vbar")
self.add_vbar_chart.connect("clicked", self.add_chart_cb, "vbar")
- self.add_vbar_chart.set_tooltip("Create a Vertical bar chart")
+ self.add_vbar_chart.set_tooltip("Create a vertical bar chart")
self.toolbarbox.toolbar.insert(self.add_vbar_chart, -1)
self.add_hbar_chart = ToolButton("hbar")
@@ -77,6 +90,26 @@ class SimpleGraph(activity.Activity):
self.toolbarbox.toolbar.insert(self.add_hbar_chart, -1)
separator = gtk.SeparatorToolItem()
+ separator.set_draw(True)
+ separator.set_expand(False)
+ self.toolbarbox.toolbar.insert(separator, -1)
+
+ self.add_line_chart = ToolButton("line")
+ self.add_line_chart.connect("clicked", self.add_chart_cb, "line")
+ self.add_line_chart.set_tooltip("Create a line chart")
+ self.toolbarbox.toolbar.insert(self.add_line_chart, -1)
+
+ separator = gtk.SeparatorToolItem()
+ separator.set_draw(True)
+ separator.set_expand(False)
+ self.toolbarbox.toolbar.insert(separator, -1)
+
+ self.add_pie_chart = ToolButton("pie")
+ self.add_pie_chart.connect("clicked", self.add_chart_cb, "pie")
+ self.add_pie_chart.set_tooltip("Create a pie chart")
+ self.toolbarbox.toolbar.insert(self.add_pie_chart, -1)
+
+ separator = gtk.SeparatorToolItem()
separator.set_draw(False)
separator.set_expand(True)
self.toolbarbox.toolbar.insert(separator, -1)
@@ -90,12 +123,15 @@ class SimpleGraph(activity.Activity):
self.paned = gtk.HPaned()
self.box = gtk.VBox()
+ self.scroll = gtk.ScrolledWindow()
+ self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.labels_and_values = TreeView()
+ self.scroll.add(self.labels_and_values)
self.labels_and_values.connect("label-changed", self.label_changed)
self.labels_and_values.connect("value-changed", self.value_changed)
- self.box.pack_start(self.labels_and_values, True, True, 0)
+ self.box.pack_start(self.scroll, True, True, 0)
self.options = Options()
@@ -103,6 +139,7 @@ class SimpleGraph(activity.Activity):
self.options.connect("hlabel-changed", self.set_h_label)
self.options.connect("vlabel-changed", self.set_v_label)
self.options.connect("chart-color-changed", self.set_chart_color)
+ self.options.connect("bg-color-changed", self.set_bg_color)
self.options.connect("line-color-changed", self.set_chart_line_color)
self.box.pack_end(self.options, False, True, 10)
@@ -121,24 +158,29 @@ class SimpleGraph(activity.Activity):
self.labels_and_values.add_value("Unknown", "0")
self.chart_data.append(("Unknown", "0"))
- def add_chart_cb(self, widget, type="vbar"):
- if type == "vbar":
- self.current_chart = BarChart(type="vertical")
-
- elif type == "hbar":
- self.current_chart = BarChart(type="horizontal")
-
- print self.chart_data
+ def remove_value(self, widget):
+ self.remove_selected_value()
- self.current_chart.data_set(self.chart_data)
- self.current_chart.set_title(self.chart_title)
- self.current_chart.set_x_label(self.x_label)
- self.current_chart.set_y_label(self.y_label)
- self.current_chart.set_chart_color(self.chart_color)
- self.current_chart.set_line_color(self.chart_line_color)
- self.current_chart.connect("ready", lambda w, f:
- self.charts_area.set_from_file(f))
- self.current_chart.render()
+ def add_chart_cb(self, widget, type="vbar"):
+ self.current_chart = Chart(type)
+
+ self.update_chart()
+
+ def update_chart(self):
+ if self.current_chart:
+ self.current_chart.data_set(self.chart_data)
+ self.current_chart.set_title(self.chart_title)
+ self.current_chart.set_x_label(self.x_label)
+ self.current_chart.set_y_label(self.y_label)
+ self.current_chart.set_bg_color(self.bg_color)
+ self.current_chart.set_color_scheme(color=self.chart_color)
+ self.current_chart.set_line_color(self.chart_line_color)
+ self.current_chart.connect("ready", lambda w, f:
+ self.charts_area.set_from_file(f))
+ if self.current_chart.type == "pie":
+ self.current_chart.render(self)
+
+ else: self.current_chart.render()
def label_changed(self, tw, path, new_label):
path = int(path)
@@ -146,7 +188,7 @@ class SimpleGraph(activity.Activity):
def value_changed(self, tw, path, new_value):
path = int(path)
- self.chart_data[path] = (self.chart_data[path][0], int(new_value))
+ self.chart_data[path] = (self.chart_data[path][0], float(new_value))
def set_h_label(self, options, label):
self.x_label = label
@@ -160,6 +202,9 @@ class SimpleGraph(activity.Activity):
def set_chart_color(self, options, color):
self.chart_color = color
+ def set_bg_color(self, options, color):
+ self.bg_color = color
+
def set_chart_line_color(self, options, color):
self.chart_line_color = color
@@ -206,6 +251,9 @@ class TreeView(gtk.TreeView):
self.model.append([label, value])
print "Added: %s, Value: %s" % (label, value)
+ def remove_selected_value(self):
+ self.remove(self.get_selection())
+
def label_changed(self, cell, path, new_text, model):
print "Change '%s' to '%s'" % (model[path][0], new_text)
model[path][0] = new_text
@@ -243,6 +291,7 @@ class Options(gtk.VBox):
'title-changed': (gobject.SIGNAL_RUN_FIRST, None, [str]),
'hlabel-changed': (gobject.SIGNAL_RUN_FIRST, None, [str]),
'vlabel-changed': (gobject.SIGNAL_RUN_FIRST, None, [str]),
+ 'bg-color-changed': (gobject.SIGNAL_RUN_FIRST, None, [object]),
'chart-color-changed': (gobject.SIGNAL_RUN_FIRST, None, [object]),
'line-color-changed': (gobject.SIGNAL_RUN_FIRST, None, [object])}
@@ -283,16 +332,29 @@ class Options(gtk.VBox):
self.pack_start(hbox, False, True, 3)
hbox = gtk.HBox()
- title = gtk.Label("Background Color:")
+ title = gtk.Label("Chart color:")
+ hbox.pack_start(title, False, True, 0)
+
+ btn = gtk.Button("Color")
+ btn.id = 3
+ btn.modify_bg(gtk.STATE_NORMAL, COLOR1)
+ btn.modify_bg(gtk.STATE_PRELIGHT, COLOR1)
+ btn.connect("clicked", self.color_selector)
+ hbox.pack_end(btn, False, True, 5)
+
+ self.pack_start(hbox, False, True, 3)
+
+ hbox = gtk.HBox()
+ title = gtk.Label("Background color:")
hbox.pack_start(title, False, True, 0)
btn = gtk.Button()
- btn.id = 0
+ btn.id = 1
label = gtk.Label("Color")
label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color("#000000"))
btn.add(label)
- btn.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color("#F3F9FB"))
- btn.modify_bg(gtk.STATE_PRELIGHT, gtk.gdk.Color("#F3F9FB"))
+ btn.modify_bg(gtk.STATE_NORMAL, COLOR2)
+ btn.modify_bg(gtk.STATE_PRELIGHT, COLOR2)
btn.connect("clicked", self.color_selector)
hbox.pack_end(btn, False, True, 5)
@@ -303,13 +365,13 @@ class Options(gtk.VBox):
hbox.pack_start(title, False, True, 0)
btn = gtk.Button()
- btn.id = 1
+ btn.id = 2
label = gtk.Label("Color")
label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color("#000000"))
btn.add(label)
btn.connect("clicked", self.color_selector)
- btn.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color("#D1E5EC"))
- btn.modify_bg(gtk.STATE_PRELIGHT, gtk.gdk.Color("#D1E5EC"))
+ btn.modify_bg(gtk.STATE_NORMAL, COLOR3)
+ btn.modify_bg(gtk.STATE_PRELIGHT, COLOR3)
hbox.pack_end(btn, False, True, 5)
self.pack_start(hbox, False, True, 3)
@@ -318,6 +380,29 @@ class Options(gtk.VBox):
def color_selector(self, widget):
selector = gtk.ColorSelectionDialog("Color Selector")
+
+ if widget.id == 3:
+
+ box = gtk.HBox()
+
+ for color in basic_colors.keys():
+ btn = gtk.Button()
+ btn.set_size_request(40, 40)
+ btn.set_property("has-tooltip", True)
+ btn.set_property("tooltip-text", str(color).capitalize())
+ btn.color = gtk.gdk.Color(basic_colors[color])
+ btn.connect("clicked", lambda w: selector.colorsel.set_current_color(w.color))
+ btn.modify_bg(gtk.STATE_NORMAL, btn.color)
+ btn.modify_bg(gtk.STATE_PRELIGHT, btn.color)
+ box.pack_start(btn, False, True, 1)
+
+ selector.vbox.pack_end(box, False, True, 0)
+ selector.colorsel.set_current_color(COLOR1)
+
+ elif widget.id == 2: selector.colorsel.set_current_color(COLOR3)
+
+ elif widget.id == 1: selector.colorsel.set_current_color(COLOR2)
+
selector.get_color_selection().connect("color-changed",
self.color_changed, widget)
selector.ok_button.connect("clicked", lambda w: selector.destroy())
@@ -346,8 +431,11 @@ class Options(gtk.VBox):
new_color = "#%s%s%s" % (red, green, blue)
- if not btn.id:
- self.emit("chart-color-changed", new_color)
+ if btn.id == 1:
+ self.emit("bg-color-changed", new_color)
- elif btn.id:
+ elif btn.id == 2:
self.emit("line-color-changed", new_color)
+
+ elif btn.id == 3:
+ self.emit("chart-color-changed", new_color)
diff --git a/charts.py b/charts.py
index 13439c3..cf3d0da 100644
--- a/charts.py
+++ b/charts.py
@@ -20,6 +20,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import pycha.bar
+import pycha.line
import pycha.pie
import cairo
@@ -29,7 +30,7 @@ import gobject
CHART_IMAGE = os.path.join("/tmp", "chart.png")
-class BarChart(gobject.GObject):
+class Chart(gobject.GObject):
__gsignals__ = {
'ready': (gobject.SIGNAL_RUN_FIRST, None, [str])}
@@ -75,11 +76,10 @@ class BarChart(gobject.GObject):
},
}
- def set_color_scheme(self, name="gradinet", args={'initialColor': 'blue'}):
- self.options["colorScheme"]["name"] = name
- self.options["args"] = args
+ def set_color_scheme(self, color='blue'):
+ self.options["colorScheme"]["args"] = {'initialColor': color}
- def set_chart_color(self, color='#f3f9fb'):
+ def set_bg_color(self, color='#f3f9fb'):
self.options["background"]["chartColor"] = color
def set_line_color(self, color='#d1e5ec'):
@@ -94,42 +94,32 @@ class BarChart(gobject.GObject):
def set_type(self, type="vertical"):
self.type = type
- def set_title(self, title="Bar Chart"):
+ def set_title(self, title="SimpleGraph Chart"):
self.options["title"] = title
- def render(self):
+ def render(self, sg=None):
self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32,
self.width,
self.height)
- if self.type == "vertical":
+ if self.type == "vbar":
chart = pycha.bar.VerticalBarChart(self.surface, self.options)
- elif self.type == "horizontal":
+ elif self.type == "hbar":
chart = pycha.bar.HorizontalBarChart(self.surface, self.options)
+ elif self.type == "line":
+ chart = pycha.line.LineChart(self.surface, self.options)
+
+ elif self.type == "pie":
+ self.options["legend"] = {"hide" : "False"}
+ chart = pycha.pie.PieChart(self.surface, self.options)
+ print sg.chart_data
+ self.dataSet = [(data[0], [[0, data[1]]]) for data in sg.chart_data]
+
chart.addDataset(self.dataSet)
chart.render()
self.surface.write_to_png(CHART_IMAGE)
self.emit("ready", CHART_IMAGE)
-
-class PieChart(gobject.GObject):
-
- __gsignals__ = {
- 'ready': (gobject.SIGNAL_RUN_FIRST, None, [str])}
-
- def __init__(self, type="vertical", width=550, height=310):
- gobject.GObject.__init__(self)
-
- self.dataSet = None
- self.options = None
- self.surface = None
-
- self.type = type
- self.width = width
- self.height = height
-
- def set_title(self, title="Pie Chart"):
- self.options["title"] = title
diff --git a/icons/hbar.svg b/icons/hbar.svg
index 78a914c..1d2c0b9 100644
--- a/icons/hbar.svg
+++ b/icons/hbar.svg
@@ -15,8 +15,8 @@
viewBox="0 0 62 60"
id="svg2"
xml:space="preserve"
- inkscape:version="0.48.2 r9819"
- sodipodi:docname="bar.svg"><sodipodi:namedview
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="hbar.svg"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
@@ -25,21 +25,27 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:window-width="1280"
- inkscape:window-height="746"
+ inkscape:window-width="1200"
+ inkscape:window-height="868"
id="namedview11"
showgrid="false"
inkscape:zoom="3.9333333"
inkscape:cx="31"
- inkscape:cy="30"
+ inkscape:cy="15.270191"
inkscape:window-x="0"
- inkscape:window-y="26"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6167" /><metadata
id="metadata24"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
- id="defs22" /><g
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
+ id="defs22"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 30 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="62 : 30 : 1"
+ inkscape:persp3d-origin="31 : 20 : 1"
+ id="perspective12" /></defs><g
transform="translate(60.127119,11.292373)"
id="activity-browse"
style="display:block">
@@ -62,20 +68,20 @@
x="139.8868"
y="-314.84146"
id="rect3001"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684000000047;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
transform="matrix(0,1,-1,0,0,0)" /><rect
width="154.12584"
height="328.53574"
x="-169.87132"
y="-433.55182"
id="rect3001-6"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684000000047;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
transform="matrix(0,1,-1,0,0,0)" /><rect
width="154.12584"
height="445.34848"
x="-137.9846"
y="104.88248"
id="rect3001-1"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684000000047;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
transform="matrix(0,-1,1,0,0,0)" /></g></g>
</g></svg> \ No newline at end of file
diff --git a/icons/line.svg b/icons/line.svg
new file mode 100755
index 0000000..1c32b34
--- /dev/null
+++ b/icons/line.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="62"
+ height="60"
+ viewBox="0 0 62 60"
+ id="svg2"
+ xml:space="preserve"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="line.svg"><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="746"
+ id="namedview11"
+ showgrid="false"
+ inkscape:zoom="3.9333333"
+ inkscape:cx="31"
+ inkscape:cy="30"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g6167"
+ showguides="true"
+ inkscape:guide-bbox="true" /><metadata
+ id="metadata24"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
+ id="defs22"><inkscape:path-effect
+ effect="spiro"
+ id="path-effect3055"
+ is_visible="true" /></defs><g
+ transform="translate(60.127119,11.292373)"
+ id="activity-browse"
+ style="display:block">
+
+ <g
+ transform="translate(-128.87712,-22.838983)"
+ id="g7"
+ style="display:inline">
+
+
+
+
+
+
+ <g
+ transform="matrix(0.10822504,0,0,0.09945444,61.358446,34.085169)"
+ id="g6167"><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:25.09949684000000047;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1"
+ d="m 141.12179,-91.137049 4.6983,355.328359 429.89519,2.55632 L 573.36613,49.460501 413.62366,103.14321 366.64058,18.784677 253.88118,172.16383 141.12179,-91.137049"
+ id="path3053"
+ inkscape:path-effect="#path-effect3055"
+ inkscape:original-d="m 141.12179,-91.137049 4.6983,355.328359 429.89519,2.55632 L 573.36613,49.460501 413.62366,103.14321 366.64058,18.784677 253.88118,172.16383 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccc" /></g></g>
+</g></svg> \ No newline at end of file
diff --git a/icons/pie.svg b/icons/pie.svg
new file mode 100644
index 0000000..b55f913
--- /dev/null
+++ b/icons/pie.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="62"
+ height="60"
+ viewBox="0 0 62 60"
+ id="svg2"
+ xml:space="preserve"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="pie.svg"><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="746"
+ id="namedview11"
+ showgrid="false"
+ inkscape:zoom="3.9333333"
+ inkscape:cx="31"
+ inkscape:cy="1.1447624"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g6167"
+ showguides="true"
+ inkscape:guide-bbox="true" /><metadata
+ id="metadata24"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
+ id="defs22"><inkscape:path-effect
+ effect="spiro"
+ id="path-effect3055"
+ is_visible="true" /></defs><g
+ transform="translate(60.127119,11.292373)"
+ id="activity-browse"
+ style="display:block">
+
+ <g
+ transform="translate(-128.87712,-22.838983)"
+ id="g7"
+ style="display:inline">
+
+
+
+
+
+
+ <g
+ transform="matrix(0.10822504,0,0,0.09945444,61.358446,34.085169)"
+ id="g6167"><polygon
+ points="59.094,124.29 60.043,126.32 61.062,128.33 62.141,130.29 63.277,132.21 64.484,134.11 65.742,135.96 67.059,137.77 68.445,139.54 69.883,141.26 71.371,142.94 72.918,144.55 74.508,146.13 76.156,147.65 77.855,149.12 79.594,150.53 81.383,151.89 83.223,153.18 85.09,154.41 86.996,155.58 88.945,156.7 122.34,95.941 53.07,96 53.07,96 53.098,98.238 53.207,100.49 53.387,102.71 53.645,104.94 53.961,107.16 54.359,109.37 54.828,111.57 55.367,113.73 55.977,115.89 56.656,118.03 57.406,120.14 58.215,122.23 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon9"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="59.094,124.29 60.043,126.32 61.062,128.33 62.141,130.29 63.277,132.21 64.484,134.11 65.742,135.96 67.059,137.77 68.445,139.54 69.883,141.26 71.371,142.94 72.918,144.55 74.508,146.13 76.156,147.65 77.855,149.12 79.594,150.53 81.383,151.89 83.223,153.18 85.09,154.41 86.996,155.58 88.945,156.7 122.34,95.941 53.07,96 53.07,96 53.098,98.238 53.207,100.49 53.387,102.71 53.645,104.94 53.961,107.16 54.359,109.37 54.828,111.57 55.367,113.73 55.977,115.89 56.656,118.03 57.406,120.14 58.215,122.23 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon11"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="117.52,165.13 119.81,165.26 122.11,165.3 124.42,165.27 126.71,165.17 129.01,164.98 131.3,164.73 133.59,164.4 135.85,163.99 138.1,163.5 140.34,162.95 142.55,162.31 144.75,161.61 146.92,160.82 149.05,159.97 151.16,159.05 153.24,158.05 155.29,157 157.3,155.87 159.27,154.68 161.2,153.42 163.08,152.09 122.33,96.004 89,156.76 89,156.76 91.039,157.82 93.105,158.83 95.215,159.77 97.344,160.64 99.512,161.43 101.7,162.15 103.91,162.81 106.13,163.38 108.38,163.88 110.65,164.3 112.93,164.66 115.22,164.93 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon17"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="117.52,165.13 119.81,165.26 122.11,165.3 124.42,165.27 126.71,165.17 129.01,164.98 131.3,164.73 133.59,164.4 135.85,163.99 138.1,163.5 140.34,162.95 142.55,162.31 144.75,161.61 146.92,160.82 149.05,159.97 151.16,159.05 153.24,158.05 155.29,157 157.3,155.87 159.27,154.68 161.2,153.42 163.08,152.09 122.33,96.004 89,156.76 89,156.76 91.039,157.82 93.105,158.83 95.215,159.77 97.344,160.64 99.512,161.43 101.7,162.15 103.91,162.81 106.13,163.38 108.38,163.88 110.65,164.3 112.93,164.66 115.22,164.93 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon19"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="182.42,130.69 183.51,128.73 184.53,126.76 185.48,124.74 186.37,122.69 187.2,120.62 187.96,118.52 188.65,116.4 189.26,114.25 189.81,112.09 190.29,109.91 190.69,107.71 191.03,105.51 191.3,103.3 191.5,101.07 191.63,98.848 191.68,96.621 191.66,94.383 191.57,92.156 191.41,89.93 191.18,87.711 190.88,85.504 190.51,83.305 190.06,81.117 189.54,78.949 188.96,76.793 188.3,74.656 122.37,96.086 163.15,152.09 163.15,152.09 164.94,150.75 166.68,149.35 168.38,147.9 170.02,146.4 171.61,144.84 173.16,143.23 174.66,141.57 176.1,139.86 177.48,138.11 178.8,136.32 180.07,134.48 181.28,132.6 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon25"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="182.42,130.69 183.51,128.73 184.53,126.76 185.48,124.74 186.37,122.69 187.2,120.62 187.96,118.52 188.65,116.4 189.26,114.25 189.81,112.09 190.29,109.91 190.69,107.71 191.03,105.51 191.3,103.3 191.5,101.07 191.63,98.848 191.68,96.621 191.66,94.383 191.57,92.156 191.41,89.93 191.18,87.711 190.88,85.504 190.51,83.305 190.06,81.117 189.54,78.949 188.96,76.793 188.3,74.656 122.37,96.086 163.15,152.09 163.15,152.09 164.94,150.75 166.68,149.35 168.38,147.9 170.02,146.4 171.61,144.84 173.16,143.23 174.66,141.57 176.1,139.86 177.48,138.11 178.8,136.32 180.07,134.48 181.28,132.6 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon27"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="173.54,49.172 171.97,47.516 170.34,45.918 168.67,44.371 166.95,42.871 165.18,41.441 163.36,40.062 161.5,38.746 159.59,37.496 157.65,36.309 155.67,35.18 153.65,34.121 151.59,33.133 149.51,32.203 147.4,31.355 145.26,30.566 143.09,29.859 140.91,29.223 138.7,28.645 136.48,28.156 134.24,27.727 131.98,27.379 129.72,27.109 127.44,26.91 125.18,26.781 122.89,26.734 120.61,26.754 118.33,26.852 116.06,27.02 113.79,27.27 122.48,96.059 188.34,74.566 188.34,74.566 187.6,72.418 186.8,70.281 185.92,68.184 184.97,66.105 183.95,64.066 182.87,62.059 181.72,60.09 180.5,58.16 179.23,56.273 177.9,54.426 176.5,52.629 175.04,50.871 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon33"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="173.54,49.172 171.97,47.516 170.34,45.918 168.67,44.371 166.95,42.871 165.18,41.441 163.36,40.062 161.5,38.746 159.59,37.496 157.65,36.309 155.67,35.18 153.65,34.121 151.59,33.133 149.51,32.203 147.4,31.355 145.26,30.566 143.09,29.859 140.91,29.223 138.7,28.645 136.48,28.156 134.24,27.727 131.98,27.379 129.72,27.109 127.44,26.91 125.18,26.781 122.89,26.734 120.61,26.754 118.33,26.852 116.06,27.02 113.79,27.27 122.48,96.059 188.34,74.566 188.34,74.566 187.6,72.418 186.8,70.281 185.92,68.184 184.97,66.105 183.95,64.066 182.87,62.059 181.72,60.09 180.5,58.16 179.23,56.273 177.9,54.426 176.5,52.629 175.04,50.871 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon35"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="86.598,36.609 84.711,37.797 82.863,39.035 81.055,40.332 79.297,41.68 77.578,43.098 75.898,44.566 74.281,46.086 72.703,47.652 71.184,49.27 69.707,50.938 68.289,52.656 66.93,54.414 65.633,56.211 64.383,58.059 63.195,59.938 62.078,61.855 61.02,63.812 60.02,65.801 59.082,67.82 58.215,69.867 57.418,71.934 56.68,74.043 56.012,76.16 55.414,78.297 54.887,80.453 54.43,82.633 54.043,84.82 53.727,87.027 53.477,89.234 53.297,91.453 53.188,93.672 53.16,95.898 122.49,95.898 113.71,27.207 113.71,27.207 111.51,27.523 109.31,27.902 107.13,28.359 104.98,28.879 102.83,29.477 100.71,30.133 98.613,30.859 96.535,31.656 94.488,32.516 92.461,33.445 90.473,34.445 88.516,35.492 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon41"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /><polygon
+ points="86.598,36.609 84.711,37.797 82.863,39.035 81.055,40.332 79.297,41.68 77.578,43.098 75.898,44.566 74.281,46.086 72.703,47.652 71.184,49.27 69.707,50.938 68.289,52.656 66.93,54.414 65.633,56.211 64.383,58.059 63.195,59.938 62.078,61.855 61.02,63.812 60.02,65.801 59.082,67.82 58.215,69.867 57.418,71.934 56.68,74.043 56.012,76.16 55.414,78.297 54.887,80.453 54.43,82.633 54.043,84.82 53.727,87.027 53.477,89.234 53.297,91.453 53.188,93.672 53.16,95.898 122.49,95.898 113.71,27.207 113.71,27.207 111.51,27.523 109.31,27.902 107.13,28.359 104.98,28.879 102.83,29.477 100.71,30.133 98.613,30.859 96.535,31.656 94.488,32.516 92.461,33.445 90.473,34.445 88.516,35.492 "
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:normal;word-spacing:normal;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6.57725498;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="polygon43"
+ transform="matrix(0,3.8499225,3.7825849,0,-4.7739308,-389.7198)" /></g></g>
+</g></svg> \ No newline at end of file
diff --git a/pycha/__init__.pyo b/pycha/__init__.pyo
index b3feabc..7e9aa3c 100644
--- a/pycha/__init__.pyo
+++ b/pycha/__init__.pyo
Binary files differ
diff --git a/pycha/bar.pyo b/pycha/bar.pyo
index d9ecac4..ff60b2e 100644
--- a/pycha/bar.pyo
+++ b/pycha/bar.pyo
Binary files differ
diff --git a/pycha/chart.pyo b/pycha/chart.pyo
index d865eda..60be0fc 100644
--- a/pycha/chart.pyo
+++ b/pycha/chart.pyo
Binary files differ
diff --git a/pycha/color.pyo b/pycha/color.pyo
index cb51d0f..2914c8c 100644
--- a/pycha/color.pyo
+++ b/pycha/color.pyo
Binary files differ
diff --git a/pycha/pie.pyo b/pycha/pie.pyo
index aeb4951..77daa2a 100644
--- a/pycha/pie.pyo
+++ b/pycha/pie.pyo
Binary files differ
diff --git a/pycha/utils.pyo b/pycha/utils.pyo
index c6613a2..84606ff 100644
--- a/pycha/utils.pyo
+++ b/pycha/utils.pyo
Binary files differ