-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6547 from plotly/autorange-bounds
Add bounds to range and autorange of cartesian, gl3d and radial axes
- Loading branch information
Showing
42 changed files
with
1,160 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Add bounds to range and autorange of cartesian, gl3d and radial axes [[#6547](https://github.com/plotly/plotly.js/pull/6547)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
module.exports = function handleAutorangeOptionsDefaults(coerce, autorange, range) { | ||
var minRange, maxRange; | ||
if(range) { | ||
var isReversed = ( | ||
autorange === 'reversed' || | ||
autorange === 'min reversed' || | ||
autorange === 'max reversed' | ||
); | ||
|
||
minRange = range[isReversed ? 1 : 0]; | ||
maxRange = range[isReversed ? 0 : 1]; | ||
} | ||
|
||
var minallowed = coerce('autorangeoptions.minallowed', maxRange === null ? minRange : undefined); | ||
var maxallowed = coerce('autorangeoptions.maxallowed', minRange === null ? maxRange : undefined); | ||
|
||
if(minallowed === undefined) coerce('autorangeoptions.clipmin'); | ||
if(maxallowed === undefined) coerce('autorangeoptions.clipmax'); | ||
|
||
coerce('autorangeoptions.include'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.