mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
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:
parent
082645d312
commit
212284cbd4
@ -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']]
|
||||
|
Loading…
Reference in New Issue
Block a user