Skip to content

Commit

Permalink
Bugfix around using an Int in a groupby
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Sep 29, 2015
1 parent 4d62adb commit 4a9987a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions panoramix/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def __init__(self, datasource, form_data):
self.form_data[k] = [v]
elif k not in as_list and isinstance(v, list) and v:
self.form_data[k] = v[0]
for i in range(50):
print('show_legend' in form_data)

self.metrics = self.form_data.get('metrics') or ['count']
self.groupby = self.form_data.get('groupby') or []
Expand Down Expand Up @@ -376,10 +374,12 @@ def get_json(self):
df['timestamp'] = pd.to_datetime(df.index, utc=False)
if isinstance(name, basestring):
series_title = name
elif len(self.metrics) > 1:
series_title = ", ".join(name)
else:
series_title = ", ".join(name[1:])
name = ["{}".format(s) for s in name]
if len(self.metrics) > 1:
series_title = ", ".join(name)
else:
series_title = ", ".join(name[1:])
d = {
"key": series_title,
"color": utils.color(series_title),
Expand Down

0 comments on commit 4a9987a

Please sign in to comment.