superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Fix bullet chart rendering (#5108)
Date Mon, 11 Jun 2018 23:40:37 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 3de79b6  Fix bullet chart rendering (#5108)
3de79b6 is described below

commit 3de79b69d0d9b4ab4fe9e9155467f730d1b19e5a
Author: Tresdon Jones <tresdonj@gmail.com>
AuthorDate: Mon Jun 11 17:40:29 2018 -0600

    Fix bullet chart rendering (#5108)
    
    * Fix bullet chart rendering
    
    * Fix code style errors
---
 superset/assets/src/visualizations/nvd3_vis.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/superset/assets/src/visualizations/nvd3_vis.js b/superset/assets/src/visualizations/nvd3_vis.js
index 7685c00..f508baf 100644
--- a/superset/assets/src/visualizations/nvd3_vis.js
+++ b/superset/assets/src/visualizations/nvd3_vis.js
@@ -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 = [];
   }

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.

Mime
View raw message