-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Faster axis autorange + remove calcIfAutorange edit type #2823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
9c2be8d
c9711dc
bd61c54
b1911b3
35d501d
a8fb653
6e19c6e
4e8ff28
c75cda8
8f23ef5
a326778
138a84f
1c40947
026cd53
1cdc36b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1858,24 +1858,21 @@ describe('Test axes', function() { | |
expect(ax._max).toEqual([{val: 6, pad: 10, extrapad: true}]); | ||
}); | ||
|
||
it('should return early if no data is given', function() { | ||
it('should fail if no data is given', function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're confident we always send an array to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I thought removing that |
||
ax = getDefaultAx(); | ||
|
||
expand(ax); | ||
expect(ax._min).toBeUndefined(); | ||
expect(ax._max).toBeUndefined(); | ||
expect(function() { expand(ax); }).toThrow(); | ||
}); | ||
|
||
it('should return early if `autorange` is falsy', function() { | ||
it('should return even if `autorange` is false', function() { | ||
ax = getDefaultAx(); | ||
data = [2, 5]; | ||
|
||
ax.autorange = false; | ||
ax.rangeslider = { autorange: false }; | ||
|
||
expand(ax, data, {}); | ||
expect(ax._min).toBeUndefined(); | ||
expect(ax._max).toBeUndefined(); | ||
expect(ax._min).toEqual([{val: 2, pad: 0, extrapad: false}]); | ||
expect(ax._max).toEqual([{val: 5, pad: 0, extrapad: false}]); | ||
}); | ||
|
||
it('should consider range slider `autorange`', function() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not
undefined
, that would error here as well as above... it's{}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch -> 026cd53