From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 23 Oct 2019 00:59:22 +0000 (-0700) Subject: Fix sampleSize option (#6586) X-Git-Tag: v2.9.0~1^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cb308d16caddfce8a50a4e616149a3c05f0e50a;p=thirdparty%2FChart.js.git Fix sampleSize option (#6586) --- diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 29134180c..b4553a86a 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -448,7 +448,7 @@ var Scale = Element.extend({ // Compute tick rotation and fit using a sampled subset of labels // We generally don't need to compute the size of every single label for determining scale size - samplingEnabled = sampleSize > ticks.length; + samplingEnabled = sampleSize < ticks.length; labels = me._convertTicksToLabels(samplingEnabled ? sample(ticks, sampleSize) : ticks); // _configure is called twice, once here, once from core.controller.updateLayout.