Calculates the range of values for this axis based on the dataset
        value amount.
        
        :param      values | [<variant>, ..]

def calculateRange(self, values):
        """
        Calculates the range of values for this axis based on the dataset
        value amount.
        
        :param      values | [<variant>, ..]
        """
        vals = filter(lambda x: x is not None, values)
        
        try:
            min_val = min(min(vals), 0)
        except ValueError:
            min_val = 0
        
        try:
            max_val = max(max(vals), 0)
        except ValueError:
            max_val = 10
        
        ndigits  = max(len(nativestring(abs(int(min_val)))), len(nativestring(abs(int(max_val)))))
        rounding = 10 ** (ndigits - 1)
        
        self.setRoundTo(rounding)
        self.setMinimum(self.rounded(min_val, rounding))
        self.setMaximum(self.rounded(max_val, rounding))
        self.reset()