mirror of
https://github.com/VisActor/VChart
synced 2024-11-21 23:51:05 +00:00
fix: enable sampling in fixed bandSize
This commit is contained in:
parent
da38e68c40
commit
e4ccacb82e
@ -37,10 +37,6 @@ export class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICartesianBand
|
||||
this.calcScales(DEFAULT_BAND_INNER_PADDING, DEFAULT_BAND_OUTER_PADDING);
|
||||
}
|
||||
|
||||
protected _initData() {
|
||||
this._initTickData(this._spec.sampling !== false && !this._spec.bandSize);
|
||||
}
|
||||
|
||||
protected axisHelper() {
|
||||
const getScale = (depth: number) => {
|
||||
return this._scales[depth];
|
||||
|
@ -25,7 +25,7 @@ export const linearDiscreteTicks = (scale: BandScale, op: ICartesianTickDataOpt)
|
||||
const range = scale.range();
|
||||
|
||||
// if range is so small
|
||||
const rangeSize = Math.abs(range[range.length - 1] - range[0]);
|
||||
const rangeSize = scale.calculateWholeRangeSize();
|
||||
if (rangeSize < 2) {
|
||||
if (op.labelLastVisible) {
|
||||
return convertDomainToTickData([domain[domain.length - 1]]);
|
||||
|
Loading…
Reference in New Issue
Block a user