Skip to content

Commit 7955a46

Browse files
authored
Merge pull request #20246 from apache/time-inverse
fix(time): fix bar bandWidth with inversed time axis
2 parents 7c7a3ed + 3bd3c7c commit 7955a46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coord/axisHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function adjustScaleForOverflow(
115115

116116
// Get Axis Length
117117
const axisExtent = model.axis.getExtent();
118-
const axisLength = axisExtent[1] - axisExtent[0];
118+
const axisLength = Math.abs(axisExtent[1] - axisExtent[0]);
119119

120120
// Get bars on current base axis and calculate min and max overflow
121121
const barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis);

0 commit comments

Comments
 (0)