'Constructor.'

def __init__(self, options=None):

    super(ChartBar, self).__init__()
    if (options is None):
        options = {}
    self.subtype = options.get('subtype')
    if (not self.subtype):
        self.subtype = 'clustered'
    self.cat_axis_position = 'l'
    self.val_axis_position = 'b'
    self.horiz_val_axis = 0
    self.horiz_cat_axis = 1
    self.show_crosses = 0
    self.x_axis['defaults']['major_gridlines'] = {'visible': 1}
    self.y_axis['defaults']['major_gridlines'] = {'visible': 0}
    if (self.subtype == 'percent_stacked'):
        self.x_axis['defaults']['num_format'] = '0%'
    self.label_position_default = 'outside_end'
    self.label_positions = {'center': 'ctr', 'inside_base': 'inBase', 'inside_end': 'inEnd', 'outside_end': 'outEnd'}
    self.set_x_axis({})
    self.set_y_axis({})
