Skip to content

Commit

Permalink
[IT-2780] Remove null values before calculating percentile value
Browse files Browse the repository at this point in the history
* TimeSeriesChart: Now with style 😎

* Card background
* Applied colors to axis
* Y-Axis ticks over complete with
* X-Axis labels with linebreaks

* TimeSeriesChart: Added y-axis description text

* TimeSeries: Added missing i18n text

* [IT-2780] Remove null values before calculating percentile value
  • Loading branch information
DanielSteger authored and finnmartens committed Sep 11, 2019
1 parent 92c0146 commit 27a30da
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class AggregationUtil {
}

static def getPercentile(List<Number> data, int percentage) {
data = data.findAll {it != null}
int index = (data.size() * (percentage.toFloat() / 100f)).toInteger()
index = Math.min(data.size() - 1, Math.max(0, index))
return getPercentileByIndex(data, index)
Expand Down

0 comments on commit 27a30da

Please sign in to comment.