New graph generation

This commit is contained in:
Pieter Vander Vennet 2022-03-17 16:40:53 +01:00
parent f1e1298bdb
commit d952b73e9e
2 changed files with 161 additions and 59 deletions

View file

@ -35,7 +35,10 @@ def createBar(options):
keys = genKeys(data, options["interpetKeysAs"])
values = list(map(lambda kv: kv["value"], data))
pyplot.bar(keys, values, label=options["name"])
color = None
if "color" in options["plot"]:
color = options["plot"]["color"]
pyplot.bar(keys, values, label=options["name"], color=color)
pyplot.legend()
@ -72,4 +75,4 @@ while (True):
createLine(options)
else:
print("Unkown type: " + options.type)
print("Plot generated")
print("Plot generated")