def create(self):
self.chart("example.python_random", '', 'A random number', 'random number',
'random', 'random', 'line', self.priority, self.update_every)
- self.dimension('random1', '', 'absolute', 1, 1)
+ self.dimension('random1')
self.commit()
return True
Converts *params to string and joins them with one space between every one.
:param params: str/int/float
"""
- self.data_stream += instruction + " "
+ self.data_stream += instruction
for p in params:
p = str(p)
if len(p) == 0:
- p = ""
- self.data_stream += "'" + p
- self.data_stream += "' "
+ p = "''"
+ if ' ' in p:
+ p = "'" + p + "'"
+ self.data_stream += " " + p
self.data_stream += "\n"
def chart(self, type_id, name="", title="", units="", family="",
divisor = 1
if name is None:
name = id
+ if algorithm not in ("absolute", "incremental", "percentage-of-absolute-row", "percentage-of-incremental-row"):
+ algorithm = "absolute"
self.dimensions.append(id)
if hidden: