|
|
@ -60,6 +60,7 @@ class Ghost(object): |
|
|
|
self.config = config |
|
|
|
self.config = config |
|
|
|
self.raw_series = [] |
|
|
|
self.raw_series = [] |
|
|
|
self.raw_series2 = [] |
|
|
|
self.raw_series2 = [] |
|
|
|
|
|
|
|
self.xml_filters = [] |
|
|
|
|
|
|
|
|
|
|
|
def add(self, title, values, secondary=False): |
|
|
|
def add(self, title, values, secondary=False): |
|
|
|
"""Add a serie to this graph""" |
|
|
|
"""Add a serie to this graph""" |
|
|
@ -70,6 +71,9 @@ class Ghost(object): |
|
|
|
else: |
|
|
|
else: |
|
|
|
self.raw_series.append((title, values)) |
|
|
|
self.raw_series.append((title, values)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_xml_filter(self, callback): |
|
|
|
|
|
|
|
self.xml_filters.append(callback) |
|
|
|
|
|
|
|
|
|
|
|
def make_series(self, series): |
|
|
|
def make_series(self, series): |
|
|
|
return prepare_values(series, self.config, self.cls) |
|
|
|
return prepare_values(series, self.config, self.cls) |
|
|
|
|
|
|
|
|
|
|
@ -79,7 +83,8 @@ class Ghost(object): |
|
|
|
series = self.make_series(self.raw_series) |
|
|
|
series = self.make_series(self.raw_series) |
|
|
|
secondary_series = self.make_series(self.raw_series2) |
|
|
|
secondary_series = self.make_series(self.raw_series2) |
|
|
|
self._last__inst = self.cls( |
|
|
|
self._last__inst = self.cls( |
|
|
|
self.config, series, secondary_series, self.uuid) |
|
|
|
self.config, series, secondary_series, self.uuid, |
|
|
|
|
|
|
|
self.xml_filters) |
|
|
|
return self._last__inst |
|
|
|
return self._last__inst |
|
|
|
|
|
|
|
|
|
|
|
# Rendering |
|
|
|
# Rendering |
|
|
|