'Constructor
@param resource: the resource
@param start: the start of the series (datetime or string expression)
@param end: the end of the time series (datetime or string expression)
@param slots: the slot size (string expression)
@param event_start: the event start field (field selector)
@param event_end: the event end field (field selector)
@param rows: the rows axis for event grouping (field selector)
@param cols: the columns axis for event grouping (field selector)
@param facts: an array of facts (S3TimeSeriesFact)
@param baseline: the baseline field (field selector)
@param title: the time series title'

def __init__(self, resource, start=None, end=None, slots=None, event_start=None, event_end=None, rows=None, cols=None, facts=None, baseline=None, title=None):

    self.resource = resource
    self.rfields = {}
    self.title = title
    self.resolve_timestamp(event_start, event_end)
    self.resolve_axes(rows, cols)
    if (not facts):
        facts = [S3TimeSeriesFact('count', resource._id.name)]
    self.facts = [fact.resolve(resource) for fact in facts]
    self.resolve_baseline(baseline)
    self.event_frame = self._event_frame(start, end, slots)
    self._select()
