fix: remove unused params

This commit is contained in:
kkxxkk2019 2023-09-06 19:28:06 +08:00
parent 045f47fdf9
commit a1b9e70da0
5 changed files with 10 additions and 10 deletions

View File

@ -55,5 +55,5 @@ export const tickAlign = (data: Array<Datum>, op: ITickAlignOpt) => {
const percent = (d.value - targetDomain[0]) / targetRange;
return currentRange * percent + currentDomain[0];
});
return convertDomainToTickData(newTicks, currentTickTransform.options);
return convertDomainToTickData(newTicks);
};

View File

@ -19,13 +19,13 @@ import { convertDomainToTickData, getCartesianLabelBounds, hasOverlap, intersect
*/
export const continuousTicks = (scale: ContinuousScale, op: ITickDataOpt): ITickData[] => {
if (!isContinuous(scale.type)) {
return convertDomainToTickData(scale.domain(), op);
return convertDomainToTickData(scale.domain());
}
// if range is so small
const range = scale.range();
const rangeSize = Math.abs(range[range.length - 1] - range[0]);
if (rangeSize < 2) {
return convertDomainToTickData([scale.domain()[0]], op);
return convertDomainToTickData([scale.domain()[0]]);
}
const { tickCount, forceTickCount, tickStep, noDecimals = false } = op;
@ -70,7 +70,7 @@ export const continuousTicks = (scale: ContinuousScale, op: ITickDataOpt): ITick
}
}
return convertDomainToTickData(scaleTicks, op);
return convertDomainToTickData(scaleTicks);
};
const methods = {

View File

@ -28,9 +28,9 @@ export const linearDiscreteTicks = (scale: BandScale, op: ICartesianTickDataOpt)
const rangeSize = Math.abs(range[range.length - 1] - range[0]);
if (rangeSize < 2) {
if (op.labelLastVisible) {
return convertDomainToTickData([domain[domain.length - 1]], op);
return convertDomainToTickData([domain[domain.length - 1]]);
}
return convertDomainToTickData([domain[0]], op);
return convertDomainToTickData([domain[0]]);
}
let scaleTicks;
@ -108,7 +108,7 @@ export const linearDiscreteTicks = (scale: BandScale, op: ICartesianTickDataOpt)
scaleTicks = scale.domain();
}
return convertDomainToTickData(scaleTicks, op);
return convertDomainToTickData(scaleTicks);
};
/** 计算合适的step */

View File

@ -18,7 +18,7 @@ export const polarAngleAxisDiscreteTicks = (scale: BandScale, op: IPolarTickData
const { tickCount, forceTickCount, tickStep, getRadius, labelOffset, labelGap = 0 } = op;
const radius = getRadius?.();
if (!radius) {
return convertDomainToTickData(scale.domain(), op);
return convertDomainToTickData(scale.domain());
}
let scaleTicks;
@ -56,7 +56,7 @@ export const polarAngleAxisDiscreteTicks = (scale: BandScale, op: IPolarTickData
scaleTicks = scale.domain();
}
return convertDomainToTickData(scaleTicks, op);
return convertDomainToTickData(scaleTicks);
};
/** 计算合适的step */

View File

@ -23,5 +23,5 @@ export const ticks = (scale: IBaseScale, op: ITickDataOpt): ITickData[] => {
}
}
}
return convertDomainToTickData(scale.domain(), op);
return convertDomainToTickData(scale.domain());
};