You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2022/04/11 21:20:26 UTC

[superset] branch master updated: make to change the getBreakPoints of polygon chart (#19573)

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

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new d8b9e72682 make to change the getBreakPoints of polygon chart (#19573)
d8b9e72682 is described below

commit d8b9e72682bdd92243d149b4e256ede30cba1bc9
Author: smileydev <47...@users.noreply.github.com>
AuthorDate: Mon Apr 11 17:20:20 2022 -0400

    make to change the getBreakPoints of polygon chart (#19573)
---
 superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.js b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.js
index 5b3bc9dfdf..4de17a9309 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.js
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.js
@@ -48,10 +48,12 @@ export function getBreakPoints(
     const precision =
       delta === 0 ? 0 : Math.max(0, Math.ceil(Math.log10(1 / delta)));
     const extraBucket = maxValue > maxValue.toFixed(precision) ? 1 : 0;
+    const startValue =
+      minValue < minValue.toFixed(precision) ? minValue - 1 : minValue;
 
     return new Array(numBuckets + 1 + extraBucket)
       .fill()
-      .map((_, i) => (minValue + i * delta).toFixed(precision));
+      .map((_, i) => (startValue + i * delta).toFixed(precision));
   }
 
   return formDataBreakPoints.sort((a, b) => parseFloat(a) - parseFloat(b));