ryanw-mobile / OctoMeter

🔥Kotlin Multiplatform Desktop/Android/iOS Energy Tracker app
Other
128 stars 10 forks source link

Agile chart plot: fix to reset floor to 0 when min rate in sight is >0 #183

Closed ryanw-mobile closed 3 months ago

ryanw-mobile commented 3 months ago

We used to hard-code the rate range floor to be 0f; then, we changed to the minimum rate in the given data set. It works when we have some negative rates, but otherwise, when all rates >0, the floor now isn't zero, so the chart (and colours) are wrong.

We'll have to apply min() to the floor calculations.