Skip to content

Commit

Permalink
Fix VerticalAxis applying excessive maximum width to labels
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmichalik committed May 21, 2024
1 parent 6807d25 commit 8427692
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,7 @@ public open class VerticalAxis<Position : AxisPosition.Vertical>(
horizontalPosition = textHorizontalPosition,
verticalPosition = verticalLabelPosition.textPosition,
rotationDegrees = labelRotationDegrees,
maxTextWidth =
when (sizeConstraint) {
// Let the `TextComponent` use as much width as it needs, based on the measuring phase.
is SizeConstraint.Auto -> Int.MAX_VALUE
else -> (bounds.width() - tickLength - axisThickness).toInt()
},
maxTextWidth = (bounds.width() - tickLength - axisThickness).toInt(),
)
}
}
Expand Down

0 comments on commit 8427692

Please sign in to comment.