'query_dict: dictionary containing the main query and the drilldown
queries.  The main query returns a row for each x value.  The first
column contains the x-axis label.  Subsequent columns contain data
for each series, named by the column names.  A column named
\'errors-<x>\' will be interpreted as errors for the series named <x>.
plot_type: \'Line\' or \'Bar\', depending on the plot type the user wants
inverted_series: list of series that should be plotted on an inverted
y-axis
normalize_to:
None - do not normalize
\'first\' - normalize against the first data point
\'x__%s\' - normalize against the x-axis value %s
\'series__%s\' - normalize against the series %s
drilldown_callback: name of drilldown callback method.'

def __init__(self, query_dict, plot_type, inverted_series, normalize_to, drilldown_callback):

    self.query_dict = query_dict
    if (plot_type == 'Line'):
        self.is_line = True
    elif (plot_type == 'Bar'):
        self.is_line = False
    else:
        raise ValidationError({'plot': 'Plot    must    be    either    Line    or    Bar'})
    self.plot_type = plot_type
    self.inverted_series = inverted_series
    self.normalize_to = normalize_to
    if (self.normalize_to is None):
        self.normalize_to = ''
    self.drilldown_callback = drilldown_callback
