viz: make sunburst work again (#728)

By using a different method for renaming the metric columns
Thanks to @simobasso for the help!

Fix #673
This commit is contained in:
Riccardo Magliocchetti 2016-07-13 16:42:00 +02:00 committed by Maxime Beauchemin
parent 082645d312
commit 212284cbd4

View File

@ -1304,9 +1304,8 @@ class SunburstViz(BaseViz):
metric = self.form_data.get('metric')
secondary_metric = self.form_data.get('secondary_metric')
if metric == secondary_metric:
ndf = df[cols]
ndf['m1'] = df[metric]
ndf['m2'] = df[metric]
ndf = df
ndf.columns = [cols + ['m1', 'm2']]
else:
cols += [
self.form_data['metric'], self.form_data['secondary_metric']]