mirror of
https://github.com/VisActor/VChart
synced 2024-11-21 23:51:05 +00:00
fix: remove unused params
This commit is contained in:
parent
045f47fdf9
commit
a1b9e70da0
@ -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);
|
||||
};
|
||||
|
@ -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 = {
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -23,5 +23,5 @@ export const ticks = (scale: IBaseScale, op: ITickDataOpt): ITickData[] => {
|
||||
}
|
||||
}
|
||||
}
|
||||
return convertDomainToTickData(scale.domain(), op);
|
||||
return convertDomainToTickData(scale.domain());
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user