diff options
author | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-07-14 01:41:10 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-07-14 01:41:10 (GMT) |
commit | 795a69b19ffa007e0247b6b5a11c047012e72937 (patch) | |
tree | 67658307b4121fb22ca6b9d15221532f939a1816 /sugarpycha/chart.py | |
parent | 54bccb64bea10e9d0fe0ad32ab50aaf07aa258a5 (diff) |
More beautiful charts :)
Diffstat (limited to 'sugarpycha/chart.py')
-rw-r--r-- | sugarpycha/chart.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sugarpycha/chart.py b/sugarpycha/chart.py index 2d75507..2ce6e05 100644 --- a/sugarpycha/chart.py +++ b/sugarpycha/chart.py @@ -365,7 +365,7 @@ class Chart(object): cx.line_to(x2, y2) cx.close_path() cx.stroke() - + cx.set_source_rgb(*hex2rgb('#000000')) cx.select_font_face(self.options.axis.tickFont, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL) @@ -384,6 +384,7 @@ class Chart(object): y = -height / 2.0 cx.move_to(x - xb, y - yb) cx.show_text(label) + cx.set_source_rgb(*hex2rgb(self.options.axis.lineColor)) if self.debug: cx.rectangle(x, y, width, height) cx.stroke() @@ -393,6 +394,7 @@ class Chart(object): y -= height / 2.0 cx.move_to(x - xb, y - yb) cx.show_text(label) + cx.set_source_rgb(*hex2rgb(self.options.axis.lineColor)) if self.debug: cx.rectangle(x, y, width, height) cx.stroke() @@ -493,7 +495,6 @@ class Chart(object): return cx.save() - cx.set_source_rgb(*hex2rgb(self.options.axis.lineColor)) cx.set_line_width(self.options.axis.lineWidth) if not self.options.axis.y.hide: @@ -504,6 +505,7 @@ class Chart(object): if self.options.axis.y.label: self._renderYAxisLabel(cx, self.options.axis.y.label) + cx.set_source_rgb(*hex2rgb(self.options.axis.lineColor)) self._renderYAxis(cx) if not self.options.axis.x.hide: @@ -514,6 +516,7 @@ class Chart(object): if self.options.axis.x.label: self._renderXAxisLabel(cx, self.options.axis.x.label) + cx.set_source_rgb(*hex2rgb(self.options.axis.lineColor)) self._renderXAxis(cx) cx.restore() |