Skip to content

Commit f65fc3f

Browse files
committed
fix: axis min/max
1 parent 9117131 commit f65fc3f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/buildAxis.linear.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ function buildTimeAxis<TDatum>(
117117
let shouldNice = true
118118

119119
if (typeof options.min === 'number') {
120-
minValue = max([options.min, minValue as Date])
120+
minValue = min([options.min, minValue as Date])
121121
shouldNice = false
122122
}
123123

124124
if (typeof options.max === 'number') {
125-
maxValue = min([options.max, maxValue as Date])
125+
maxValue = max([options.max, maxValue as Date])
126126
shouldNice = false
127127
}
128128

@@ -240,12 +240,12 @@ function buildLinearAxis<TDatum>(
240240
let shouldNice = true
241241

242242
if (typeof options.min === 'number') {
243-
minValue = max([options.min, minValue as number])
243+
minValue = min([options.min, minValue as number])
244244
shouldNice = false
245245
}
246246

247247
if (typeof options.max === 'number') {
248-
maxValue = min([options.max, maxValue as number])
248+
maxValue = max([options.max, maxValue as number])
249249
shouldNice = false
250250
}
251251

0 commit comments

Comments
 (0)