oliexdev / openScale

Open-source weight and body metrics tracker, with support for Bluetooth scales
GNU General Public License v3.0
1.68k stars 292 forks source link

Increase the offset so that Y-axis labels with decimals places fit #969

Closed undefiened closed 1 year ago

undefiened commented 1 year ago

I don't really know how to properly fix this, but experimentally I have found the value of the offset multiplier which fixes the issue of labels being cut out. It eats a little bit more space when no decimal places are present, but at least it works fine otherwise. I understand that this is a dirty hack, so no hard feelings from my side if it doesn't make it upstream.

Screenshot before: 2023-07-22_12-40_1

Screenshots after: 2023-07-22_12-39 2023-07-22_12-40

undefiened commented 1 year ago

Actually, after creating this PR, I think I've found a less dirty hack by just adding one symbol worth of space similar to how the charting library does it. I updated the code.

oliexdev commented 1 year ago

thanks for your PR :+1: