Fixed negative month cost in realtime calculation

This commit is contained in:
Gunnar Skjold
2023-06-11 08:20:09 +02:00
parent 538624b6eb
commit 06a0366762
3 changed files with 8 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
heightAvailable = height-(config.title ? 20 : 0);
let innerWidth = width - (config.padding.left + config.padding.right);
barWidth = innerWidth / config.points.length;
labelOffset = barWidth < vertSwitch ? 30 : 10;
labelOffset = barWidth < vertSwitch ? 30 : 15;
let yPerUnit = (heightAvailable-config.padding.top-config.padding.bottom)/(config.y.max-config.y.min);