superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject [incubator-superset] branch lyftga updated: fix: add check for polygon tooltips (#7226)
Date Thu, 04 Apr 2019 01:44:11 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/lyftga by this push:
     new a875239  fix: add check for polygon tooltips (#7226)
a875239 is described below

commit a875239259052aafe3cbcb2ad65530b86a5fb2e6
Author: Kim Truong <47833996+khtruong@users.noreply.github.com>
AuthorDate: Wed Apr 3 18:44:03 2019 -0700

    fix: add check for polygon tooltips (#7226)
---
 superset/assets/src/visualizations/deckgl/layers/Polygon/Polygon.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/visualizations/deckgl/layers/Polygon/Polygon.jsx b/superset/assets/src/visualizations/deckgl/layers/Polygon/Polygon.jsx
index ca7d413..7e30668 100644
--- a/superset/assets/src/visualizations/deckgl/layers/Polygon/Polygon.jsx
+++ b/superset/assets/src/visualizations/deckgl/layers/Polygon/Polygon.jsx
@@ -94,6 +94,9 @@ export function getLayer(formData, payload, setTooltip, selected, onSelect,
filt
     }
     return baseColor;
   };
+  const tooltipContentGenerator = (fd.line_column && fd.metric && ['geohash',
'zipcode'].indexOf(fd.line_type) >= 0)
+    ? setTooltipContent(fd)
+    : undefined;
   return new PolygonLayer({
     id: `path-layer-${fd.slice_id}`,
     data,
@@ -108,7 +111,7 @@ export function getLayer(formData, payload, setTooltip, selected, onSelect,
filt
     getElevation: d => getElevation(d, colorScaler),
     elevationScale: fd.multiplier,
     fp64: true,
-    ...commonLayerProps(fd, setTooltip, setTooltipContent(fd), onSelect),
+    ...commonLayerProps(fd, setTooltip, tooltipContentGenerator, onSelect),
   });
 }
 


Mime
View raw message