Fix sampleSize option (#6586)

This commit is contained in:
Ben McCann 2019-10-22 17:59:22 -07:00 committed by Evert Timberg
parent c6c991d0f0
commit 3cb308d16c

View File

@ -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.