You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/12/18 19:16:14 UTC
[incubator-superset] branch master updated: Fix deck.gl Polygon not
show (#6545)
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 926f78c Fix deck.gl Polygon not show (#6545)
926f78c is described below
commit 926f78c21d2ef513edcbc9af2e766bfe5c8e8b53
Author: MukaJiTrue <45...@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 "// "
---
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,
};
});