Logo Search packages:      
Sourcecode: hamster-applet version File versions

def hamster::charting::Chart::__init__ (   self,

here is init

Definition at line 112 of file charting.py.

00112                               :
        """here is init"""
        self.connect("expose_event", self._expose)
        self.data, self.prev_data = None, None #start off with an empty hand
        """now see what we have in args!"""
        self.orient_vertical = "orient" not in args or args["orient"] == "vertical" # defaults to true
        self.max_bar_width = None
        if "max_bar_width" in args: self.max_bar_width = args["max_bar_width"]        

        self.values_on_bars = "values_on_bars" in args and args["values_on_bars"] #defaults to false

        self.collapse_whitespace = "collapse_whitespace" in args and args["collapse_whitespace"] #defaults to false
        self.stretch_grid = "stretch_grid" in args and args["stretch_grid"] #defaults to false

        self.animate = "animate" not in args or args["animate"] # defaults to true
        self.legend_width = None
        if "legend_width" in args: self.legend_width = args["legend_width"]
        #and some defaults
        self.default_grid_stride = 50
        self.animation_frames = 150
        self.animation_timeout = 20 #in miliseconds

        self.current_frame = self.animation_frames
        self.freeze_animation = False
    def _expose(self, widget, event): # expose is when drawing's going on

Generated by  Doxygen 1.6.0   Back to index