mirror of https://github.com/apache/superset.git
Fix bullet chart rendering (#5108)
* Fix bullet chart rendering * Fix code style errors
This commit is contained in:
parent
a3477abf7e
commit
3de79b69d0
|
@ -118,9 +118,13 @@ export default function nvd3Vis(slice, payload) {
|
|||
|
||||
let data;
|
||||
if (payload.data) {
|
||||
data = payload.data.map(x => ({
|
||||
...x, key: formatLabel(x.key, slice.datasource.verbose_map),
|
||||
}));
|
||||
if (Array.isArray(payload.data)) {
|
||||
data = payload.data.map(x => ({
|
||||
...x, key: formatLabel(x.key, slice.datasource.verbose_map),
|
||||
}));
|
||||
} else {
|
||||
data = payload.data;
|
||||
}
|
||||
} else {
|
||||
data = [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue