def addGroup (self, group, pairs, url = None):
        if not self.padding:
            self.counter += self.graph ().settings.barPadding
            self.padding = True
        #group = self.cleanInput (group)
        vals = []
        g = Group ()
        g.xml['data'] = group
        settings = self.graph ().settings
        g.x = self.counter
        for i, (key, val) in enumerate (pairs):
            #key = self.cleanInput (key)
            vals.append (val)
            rect = Rectangle (x = self.counter, y = 0, height = val, width = 1)
            g.draw (rect)
            rect.xml['has-tooltip'] = True
            rect.xml['tooltip-text'] = 'Value: ' + str (val)
            rect.xml['name'] = key
            rect.xml['group'] = group
            rect.xml['value'] = str (val)
            if url:
                rect.xml['explore'] = str (url[i])
            self.lastBar = self.counter + settings.barWidth
            self.counter += (settings.barWidth + settings.barSpacing)
        if len (g) > 0:
            g.width = g.x - self.lastBar
            g.height = max (vals)
            self.data.draw (g)
        self.counter += settings.blankSpace
dataset/ETHPy150Open dotskapes/dotSkapes/modules/savage/graph/canvas.py/BarCanvas.addGroup/swapped operands of `-`