Skip to content

Commit

Permalink
Set minimum and maximum values for the left axis of the traffic chart
Browse files Browse the repository at this point in the history
  • Loading branch information
irfano committed Feb 29, 2024
1 parent 8394773 commit 10bbe8e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ class TrafficBarChartViewHolder(parent: ViewGroup) : BlockListItemViewHolder(
setDrawZeroLine(false)
setDrawLabels(false)
setDrawAxisLine(false)
axisMinimum = 0f
axisMaximum = if (maxYValue < minYValue) {
minYValue
} else {
roundUp(maxYValue.toFloat())
}
}

chart.axisRight.apply {
Expand Down

0 comments on commit 10bbe8e

Please sign in to comment.