[hamster-applet/2_28_no_bars] no grid and background



commit d48a83be66cd915e5d3513983e4a21db3dbf0daa
Author: Toms Bauģis <toms baugis gmail com>
Date:   Tue Nov 10 20:30:20 2009 +0000

    no grid and background

 hamster/charting.py |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/hamster/charting.py b/hamster/charting.py
index eacde2c..e436e66 100644
--- a/hamster/charting.py
+++ b/hamster/charting.py
@@ -353,34 +353,6 @@ class BarChart(Chart):
                               bar_width - (gap * 2),
                               bar_size, base_color)
 
-        #fill with white background (necessary for those dragging cases)
-        if self.background:
-            self.fill_area(0, 0, legend_width, self.height, self.background)
-
-        #white grid and scale values
-        self.layout.set_width(-1)
-        if self.grid_stride and self.max_value:
-            # if grid stride is less than 1 then we consider it to be percentage
-            if self.grid_stride < 1:
-                grid_stride = int(self.max_value * self.grid_stride)
-            else:
-                grid_stride = int(self.grid_stride)
-            
-            context.set_line_width(1)
-            for i in range(grid_stride, int(self.max_value), grid_stride):
-                y = max_bar_size * (i / self.max_value)
-
-                if self.show_scale:
-                    self.layout.set_text(self.value_format % i)
-                    label_w, label_h = self.layout.get_pixel_size()
-                    context.move_to(legend_width - label_w - 8,
-                                    self.get_pixel(y_value=y) - label_h / 2)
-                    self.set_color(graphics.Colors.aluminium[4])
-                    context.show_layout(self.layout)
-
-                self.set_color((255, 255, 255))
-                self.context.move_to(legend_width, self.get_pixel(y_value=y))
-                self.context.line_to(self.width, self.get_pixel(y_value=y))
 
 
         #stack keys



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]