villebro commented on a change in pull request #11018:
URL:
https://github.com/apache/incubator-superset/pull/11018#discussion_r494937356
##########
File path: superset/viz.py
##########
@@ -3014,23 +3014,25 @@ def nest_values(
for m in levels[0].index
]
if level == 1:
+ metric_level = levels[1][metric]
return [
{
"name": i,
- "val": levels[1][metric][i],
+ "val": metric_level[i],
"children": self.nest_values(levels, 2, metric, [i]),
}
- for i in levels[1][metric].index
+ for i in metric_level.index
]
if level >= len(levels):
return []
+ dim_level = levels[level][metric][[dims[0]]]
Review comment:
Note to self (in case this causes a regression):
`levels[level][metric][[dims[-1]]]` should produce the same result.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]