Removed reduced + original_color for influx, doc for influxgraph
This commit is contained in:
11
colors.py
11
colors.py
@@ -4,12 +4,12 @@ def assign_colors_to_curves(blocks):
|
||||
|
||||
Parameters :
|
||||
|
||||
blocks ["tag":(str),"unit":(str), "curves":[{"name":(str), "label":(str), "color":(str)}]] : a list of dictionnaries, each one representing
|
||||
a block of curves with their name, their label and their color (if found in the database), grouped by their tag (which can be the unit augmented with an index) and their unit
|
||||
blocks (["tag":(str),"unit":(str), "curves":[{"name":(str), "label":(str), "color":(str)}]]) : a list of dictionnaries, each one representing
|
||||
a block of curves with their name, their label and their color to display (can be empty if not defined before), grouped by their category if given or unit (in tag).
|
||||
|
||||
Returns :
|
||||
["tag":(str),"unit":(str), "curves":[{"name":(str), "label":(str), "color":(str), "original_color":(str)}]] : the same object as the "blocks" parameter, with the color value
|
||||
updated depending on its availability in the ColorMap, and a new "original_color" value which contains the previous "color" value
|
||||
["tag":(str),"unit":(str), "curves":[{"name":(str), "label":(str), "color":(str)}]] : the same object as the "blocks" parameter, with the color value
|
||||
updated depending on its availability in the ColorMap
|
||||
"""
|
||||
|
||||
# get last value only
|
||||
@@ -23,14 +23,11 @@ def assign_colors_to_curves(blocks):
|
||||
if c < 0:
|
||||
valid = ColorMap.check_hex(col)
|
||||
if valid:
|
||||
curve["original_color"] = col
|
||||
curve["color"] = valid
|
||||
else:
|
||||
auto_curves.append(curve)
|
||||
curve["original_color"] = col + "?"
|
||||
else:
|
||||
color_set.add(c)
|
||||
curve["original_color"] = col
|
||||
curve["color"] = ColorMap.to_hex(c)
|
||||
c = 1 # omit white
|
||||
for curve in auto_curves:
|
||||
|
||||
Reference in New Issue
Block a user