Skip to content

Commit

Permalink
fix minY when series goals are provided in a boxplot chart
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Nov 27, 2024
1 parent 28118fd commit ec38e78
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/modules/Range.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,18 @@ class Range {
maxY = Math.max(maxY, gl.series[i][j])
lowestY = Math.min(lowestY, gl.series[i][j])
}
highestY = maxY

if (
gl.seriesGoals[i] &&
gl.seriesGoals[i][j] &&
Array.isArray(gl.seriesGoals[i][j])
) {
gl.seriesGoals[i][j].forEach((g) => {
if (minY !== Number.MIN_VALUE) {
minY = Math.min(minY, g.value)
lowestY = minY
}
maxY = Math.max(maxY, g.value)
highestY = maxY
lowestY = Math.min(lowestY, g.value)
})
}
highestY = maxY

if (Utils.isFloat(val)) {
val = Utils.noExponents(val)
Expand Down

0 comments on commit ec38e78

Please sign in to comment.