From 97ff3deac36559a79df07a50bfb7ba73984ea06e Mon Sep 17 00:00:00 2001 From: mashazyu <mariya.z@gmail.com> Date: Wed, 30 Dec 2020 17:32:34 +0100 Subject: [PATCH] Fixes extra horizontal grid line on chart --- components/helpers/chart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/helpers/chart.js b/components/helpers/chart.js index 80b75519..318bd672 100644 --- a/components/helpers/chart.js +++ b/components/helpers/chart.js @@ -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 } } -- GitLab