#NEWLINE# def __init__( self , data , horizontal = None , vertical = None , width = None , color = None , transparency_mask = None ) : #NEWLINE# #INDENT# mod_main . CoordinateSystemElement . __init__ ( self , transparency_mask = transparency_mask ) #NEWLINE# if ( bool ( horizontal ) == bool ( vertical ) ) : #NEWLINE# #INDENT# raise Exception ( 'Bar chart must be be horizontal or vertical' ) #NEWLINE# #UNINDENT# if ( not data ) : #NEWLINE# #INDENT# raise Exception ( 'Data must be set' ) #NEWLINE# #UNINDENT# self . horizontal = horizontal #NEWLINE# self . data_generator = get_generator ( color ) #NEWLINE# self . width = width #NEWLINE# self . color = self . get_color ( color ) #NEWLINE# self . reload_bounds ( )