Remove unused method parameter (#7229)

This commit is contained in:
Ben McCann 2020-03-29 12:02:27 -07:00 committed by GitHub
parent 49935347ff
commit 3f58edbe80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,10 +175,9 @@ function getEvenSpacing(arr) {
/**
* @param {number[]} majorIndices
* @param {Tick[]} ticks
* @param {number} axisLength
* @param {number} ticksLimit
*/
function calculateSpacing(majorIndices, ticks, axisLength, ticksLimit) {
function calculateSpacing(majorIndices, ticks, ticksLimit) {
const evenMajorSpacing = getEvenSpacing(majorIndices);
const spacing = ticks.length / ticksLimit;
@ -1021,8 +1020,7 @@ export default class Scale extends Element {
_autoSkip(ticks) {
const me = this;
const tickOpts = me.options.ticks;
const axisLength = me._length;
const ticksLimit = tickOpts.maxTicksLimit || axisLength / me._tickSize();
const ticksLimit = tickOpts.maxTicksLimit || me._length / me._tickSize();
const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];
const numMajorIndices = majorIndices.length;
const first = majorIndices[0];
@ -1035,7 +1033,7 @@ export default class Scale extends Element {
return newTicks;
}
const spacing = calculateSpacing(majorIndices, ticks, axisLength, ticksLimit);
const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);
if (numMajorIndices > 0) {
let i, ilen;