Skip to content
Snippets Groups Projects
Commit 674c3837 authored by ale's avatar ale
Browse files

simpler chart

parent 375c45b7
No related branches found
No related tags found
No related merge requests found
...@@ -33,16 +33,16 @@ def _mk_stats_graph(x=450, y=270): ...@@ -33,16 +33,16 @@ def _mk_stats_graph(x=450, y=270):
ts = g.sm.state_count_ts ts = g.sm.state_count_ts
chart = SimpleLineChart(x, y) chart = SimpleLineChart(x, y)
labels = [] labels = sorted(ts.keys())
for key, rbuf in ts.iteritems(): chart.set_legend(labels)
values = rbuf.get_values() for key in labels:
values = ts[key].get_values()
chart.add_data(values) chart.add_data(values)
labels.append(key)
nkeys = len(labels) nkeys = len(labels)
chart.add_data([0] * nkeys) chart.add_data([0] * nkeys)
chart.set_colours(_palette[:nkeys]) chart.set_colours(_palette[:nkeys])
for i in xrange(nkeys - 1): #for i in xrange(nkeys - 1):
chart.add_fill_range(_palette[i], i, i+1) # chart.add_fill_range(_palette[i], i, i+1)
return chart.get_url() return chart.get_url()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment