This is an automated email from the ASF dual-hosted git repository.

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

commit 83929985d0e0228a347711d07501f5ff4c67f6ad
Author: MukaJiTrue <45657828+mukajit...@users.noreply.github.com>
AuthorDate: Wed Dec 19 02:16:09 2018 +0700

    Fix deck.gl Polygon not show (#6545)
    
    * Fix deck.gl Polygon not show
    
    * Replace "//" to "// "
    
    (cherry picked from commit 926f78c21d2ef513edcbc9af2e766bfe5c8e8b53)
---
 superset/assets/src/visualizations/deckgl/utils.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/visualizations/deckgl/utils.js 
b/superset/assets/src/visualizations/deckgl/utils.js
index 10c9363..149ef2b 100644
--- a/superset/assets/src/visualizations/deckgl/utils.js
+++ b/superset/assets/src/visualizations/deckgl/utils.js
@@ -89,8 +89,10 @@ export function getBuckets(fd, features, accessor) {
   breakPoints.slice(1).forEach((value, i) => {
     const range = breakPoints[i] + ' - ' + breakPoints[i + 1];
     const mid = 0.5 * (parseInt(breakPoints[i], 10) + parseInt(breakPoints[i + 
1], 10));
+   // fix polygon doesn't show
+   const metricLabel = fd.metric ? fd.metric.label || fd.metric : null;
     buckets[range] = {
-      color: colorScaler({ [fd.metric.label || fd.metric]: mid }),
+      color: colorScaler({ [metricLabel || fd.metric]: mid }),
       enabled: true,
     };
   });

Reply via email to