Skip to content

Commit

Permalink
fix: axis min/max
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Jul 22, 2021
1 parent 9117131 commit f65fc3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/buildAxis.linear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ function buildTimeAxis<TDatum>(
let shouldNice = true

if (typeof options.min === 'number') {
minValue = max([options.min, minValue as Date])
minValue = min([options.min, minValue as Date])
shouldNice = false
}

if (typeof options.max === 'number') {
maxValue = min([options.max, maxValue as Date])
maxValue = max([options.max, maxValue as Date])
shouldNice = false
}

Expand Down Expand Up @@ -240,12 +240,12 @@ function buildLinearAxis<TDatum>(
let shouldNice = true

if (typeof options.min === 'number') {
minValue = max([options.min, minValue as number])
minValue = min([options.min, minValue as number])
shouldNice = false
}

if (typeof options.max === 'number') {
maxValue = min([options.max, maxValue as number])
maxValue = max([options.max, maxValue as number])
shouldNice = false
}

Expand Down

1 comment on commit f65fc3f

@vercel
Copy link

@vercel vercel bot commented on f65fc3f Jul 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.