mirror of
https://github.com/VisActor/VChart
synced 2024-11-21 23:51:05 +00:00
fix: use Math.ceil in linearDiscreteTicks()
This commit is contained in:
parent
e5e59d6141
commit
c90ea27034
@ -118,7 +118,7 @@ export const linearDiscreteTicks = (scale: BandScale, op: ICartesianTickDataOpt)
|
||||
|
||||
const step =
|
||||
rangeEnd - rangeStart - labelGap > 0
|
||||
? Math.floor((domain.length * (labelGap + maxBounds[2])) / (rangeEnd - rangeStart - labelGap))
|
||||
? Math.ceil((domain.length * (labelGap + maxBounds[2])) / (rangeEnd - rangeStart - labelGap))
|
||||
: domain.length - 1;
|
||||
|
||||
scaleTicks = (scale as BandScale).stepTicks(step);
|
||||
|
Loading…
Reference in New Issue
Block a user