Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 5, 2021
1 parent 740e22f commit 4217f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/report/reporters/boxplot/width.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export const getWidths = function (combinations, screenWidth, mini) {

const getMinMaxBlockWidth = function (combinations, mini, statName) {
return Math.max(
...combinations.map(({ quantiles }) =>
getSingleMinMaxWidth(quantiles, mini, statName),
...combinations.map((combination) =>
getSingleMinMaxWidth(combination, mini, statName),
),
)
}

const getSingleMinMaxWidth = function (quantiles, mini, statName) {
const getSingleMinMaxWidth = function ({ quantiles }, mini, statName) {
return quantiles === undefined
? 0
: getPaddedStat(quantiles[statName].pretty, mini).length
Expand Down

0 comments on commit 4217f12

Please sign in to comment.