Skip to content

Commit

Permalink
DefaultCartesianMarker#drawLabel: Correct topPointY calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmichalik committed Apr 25, 2024
1 parent 1eb6718 commit 1b54c76
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ public open class DefaultCartesianMarker(
verticalPosition = VerticalPosition.Top
} else {
val topPointY =
targets.maxOf { target ->
targets.minOf { target ->
when (target) {
is CandlestickCartesianLayerMarkerTarget -> target.highCanvasY
is ColumnCartesianLayerMarkerTarget ->
target.columns.maxOf(ColumnCartesianLayerMarkerTarget.Column::canvasY)
target.columns.minOf(ColumnCartesianLayerMarkerTarget.Column::canvasY)
is LineCartesianLayerMarkerTarget ->
target.points.maxOf(LineCartesianLayerMarkerTarget.Point::canvasY)
target.points.minOf(LineCartesianLayerMarkerTarget.Point::canvasY)
else -> error("Unexpected `CartesianMarker.Target` implementation.")
}
}
Expand Down

0 comments on commit 1b54c76

Please sign in to comment.