mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[hotfix on dist_bar] bringing back overwritten handling of ints and tuples
This commit is contained in:
parent
1b330a8c55
commit
5ca55a5585
@ -1168,12 +1168,19 @@ class DistributionBarViz(DistributionPieViz):
|
||||
l = [str(s) for s in name[1:]]
|
||||
series_title = ", ".join(l)
|
||||
values = []
|
||||
for i, v in ys.iteritems():
|
||||
x = i
|
||||
if isinstance(x, (tuple, list)):
|
||||
x = ', '.join([str(s) for s in x])
|
||||
else:
|
||||
x = str(x)
|
||||
values.append({
|
||||
'x': x,
|
||||
'y': v,
|
||||
})
|
||||
d = {
|
||||
"key": series_title,
|
||||
"values": [
|
||||
{'x': i, 'y': v}
|
||||
for i, v in ys.iteritems()
|
||||
]
|
||||
"values": values,
|
||||
}
|
||||
chart_data.append(d)
|
||||
return chart_data
|
||||
|
Loading…
Reference in New Issue
Block a user