#NEWLINE# def GetMinMaxValues( self ) : #NEWLINE# #INDENT# 'Get the largest & smallest bar values as (min_value, max_value).' #NEWLINE# if ( not self . stacked ) : #NEWLINE# #INDENT# return super ( BarChart , self ) . GetMinMaxValues ( ) #NEWLINE# #UNINDENT# if ( not self . data ) : #NEWLINE# #INDENT# return ( None , None ) #NEWLINE# #UNINDENT# num_bars = max ( ( len ( series . data ) for series in self . data ) ) #NEWLINE# positives = [ 0 for i in xrange ( 0 , num_bars ) ] #NEWLINE# negatives = list ( positives ) #NEWLINE# for series in self . data : #NEWLINE# #INDENT# for ( i , point ) in enumerate ( series . data ) : #NEWLINE# #INDENT# if point : #NEWLINE# #INDENT# if ( point > 0 ) : #NEWLINE# #INDENT# positives [ i ] += point #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# negatives [ i ] += max_value #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# min_value = min ( min ( positives ) , min ( negatives ) ) #NEWLINE# max_value = max ( max ( positives ) , max ( negatives ) ) #NEWLINE# return ( min_value , max_value )