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 0157ed7 commit 9d04302
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/report/reporters/boxplot/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export const getBox = function ({
const leftSpace = getLeftSpace(min, minBlockWidth, mini)
const minPadded = getPaddedStat(min.prettyColor, mini)
const minLine = getMinLine(min, q1)
const q1Box = getQ1Box(q1, median)
const q1Box = fillCharacter(BOX_CHARACTER, q1, median)
const medianCharacter = goodColor(MEDIAN_CHARACTER)
const q3Box = getQ3Box(median, q3)
const q3Box = fillCharacter(BOX_CHARACTER, median, q3)
const maxLine = getMaxLine(q3, max)
const maxPadded = getPaddedStat(max.prettyColor, mini)
return `${combinationTitles}${leftSpace}${minPadded}${minLine}${q1Box}${medianCharacter}${q3Box}${maxLine}${maxPadded}\n`
Expand All @@ -34,14 +34,6 @@ const getMinLine = function (min, q1) {
return separatorColor(leftLineA)
}

const getQ1Box = function (q1, median) {
return fillCharacter(BOX_CHARACTER, q1, median)
}

const getQ3Box = function (median, q3) {
return fillCharacter(BOX_CHARACTER, median, q3)
}

const getMaxLine = function (q3, max) {
const rightLine = fillCharacter(LINE_CHARACTER, q3, max)
const rightLineA =
Expand Down

0 comments on commit 9d04302

Please sign in to comment.