From 1ff9c2d6da1587009576acfdfca95351c874b418 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Mon, 18 Nov 2019 08:52:19 +0200 Subject: [PATCH] Fix tick spacing calculation --- src/core/core.scale.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 5b59f348d2b..414e88b006a 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -242,7 +242,7 @@ function getEvenSpacing(arr) { function calculateSpacing(majorIndices, ticks, axisLength, ticksLimit) { var evenMajorSpacing = getEvenSpacing(majorIndices); - var spacing = (ticks.length - 1) / ticksLimit; + var spacing = ticks.length / ticksLimit; var factors, factor, i, ilen; // If the major ticks are evenly spaced apart, place the minor ticks