Skip to content

Commit

Permalink
Fix deck.gl Polygon not show (#6545)
Browse files Browse the repository at this point in the history
* Fix deck.gl Polygon not show

* Replace "//" to "// "

(cherry picked from commit 926f78c)
  • Loading branch information
MukaJiTrue authored and michellethomas committed Jan 9, 2019
1 parent 7dddc61 commit 8392998
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/assets/src/visualizations/deckgl/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
});
Expand Down

0 comments on commit 8392998

Please sign in to comment.