You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/04/10 02:29:44 UTC
[GitHub] [incubator-superset] betodealmeida opened a new pull request #7264:
Add extra bucket when max outside range
betodealmeida opened a new pull request #7264: Add extra bucket when max outside range
URL: https://github.com/apache/incubator-superset/pull/7264
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
In the deck.gl legend we round down the values so they look nice. Depending on the metric, this makes the maximum value be outside the range of the last bucket, eg, if:
```
min = 8.4
max = 27.1
buckets = 5
```
The buckets will be:
```
8-12
12-16
16-20
20-23
23-27
```
And `27.1` will fall outside the buckets. This PR adds an extra bucket in cases like this.
<!-- ##### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF -->
<!--- Skip this if not applicable -->
##### TEST PLAN
<!--- What steps were taken to verify -->
Tested with data, an extra bucket `27-31` gets created.
Also tested with values that are identical to the upper range of the last bucket. In that case no extra bucket gets created.
##### ADDITIONAL INFORMATION
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
<!--- Check any relevant boxes with "x" -->
[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration. Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API
[X] Fixes bug
[ ] Refactors code
[ ] Adds test(s)
##### REVIEWERS
@xtinec @khtruong @datability-io
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org