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: Add extra bucket when max outside range (#7264)
Date Wed, 10 Apr 2019 02:35:22 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 984b04d  Add extra bucket when max outside range (#7264)
984b04d is described below

commit 984b04d1e5251702170af143ebd373393811af8c
Author: Beto Dealmeida <roberto@dealmeida.net>
AuthorDate: Tue Apr 9 19:35:13 2019 -0700

    Add extra bucket when max outside range (#7264)
---
 superset/assets/src/visualizations/deckgl/utils.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/visualizations/deckgl/utils.js b/superset/assets/src/visualizations/deckgl/utils.js
index 76ed54d..b2b130a 100644
--- a/superset/assets/src/visualizations/deckgl/utils.js
+++ b/superset/assets/src/visualizations/deckgl/utils.js
@@ -38,7 +38,8 @@ export function getBreakPoints({
     const precision = delta === 0
       ? 0
       : Math.max(0, Math.ceil(Math.log10(1 / delta)));
-    return Array(numBuckets + 1)
+    const extraBucket = maxValue > maxValue.toFixed(precision) ? 1 : 0;
+    return Array(numBuckets + 1 + extraBucket)
       .fill()
       .map((_, i) => (minValue + i * delta).toFixed(precision));
   }


Mime
View raw message