Fixes extra horizontal grid line on chart

This commit is contained in:
mashazyu
2020-12-30 17:32:34 +01:00
parent 08d18c1241
commit 97ff3deac3
+1 -1
View File
@@ -21,7 +21,7 @@ function getTickConfig() {
//Add 1 tick above the max value to display on chart
const scaleMax = scaleObservable.value.max + unit
const scaleMin = scaleObservable.value.min - unit
const numberOfTicks = (scaleMax - scaleMin) / unit + 1
const numberOfTicks = Math.round((scaleMax - scaleMin) / unit + 1)
return { numberOfTicks, scaleMax, scaleMin, unit }
}