forked from MapComplete/MapComplete
New graph generation
This commit is contained in:
parent
f1e1298bdb
commit
d952b73e9e
2 changed files with 161 additions and 59 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue