-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add bounds to range and autorange of cartesian, gl3d and radial axes #6547
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
Merged
Merged
Changes from 30 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
2b470ba
add autorange min max to cartesian, gl3d & radial axes
archmoj e981da5
test autorange min max on cartesian gl3d & radial axes
archmoj c7b57f5
add range min and max to cartesian, gl3d and radial axes
archmoj 8c2320d
draft log for PR 6547
archmoj 3cda56a
Merge remote-tracking branch 'origin/master' into autorange-bounds
archmoj 3f2e6e7
rename autorange clip min max
archmoj cf7b264
add autorange exact min and max
archmoj 78b5160
centralized function
archmoj 8c61f11
add autorange include
archmoj c528781
revisit autorange include options
archmoj 113ec69
centralize autorange options defaults
archmoj c7153ca
ensure min < max in case both defined
archmoj ab9d1cc
limit range during scattergl update
archmoj 16a8213
limit corner draggers considering rangemin or rangemax
archmoj 4d891b3
ensure ranges stay in bound after setting in dragAxList
archmoj d787b9f
revise attributes
archmoj cb55c08
introduce null range and new autorange options
archmoj 595a00c
use null in ranges to set defaults
archmoj fc79461
declare isReversed() function
archmoj c38ed70
use null ranges as default values for autorange eoptions min/max allowed
archmoj f8a0501
Merge branch 'master' into autorange-bounds
archmoj 14ea726
Merge remote-tracking branch 'origin/master' into autorange-bounds
archmoj 13dfe31
update draftlog
archmoj 308ae20
Merge remote-tracking branch 'origin/master' into autorange-bounds
archmoj e4f906c
Update src/plots/cartesian/layout_attributes.js
archmoj 04b8efa
update schema test
archmoj 086282c
fix hasValidMinAndMax for autorangeoptions allowed attrs
archmoj 699fb78
keep null items in range when calling cleanRange
archmoj 36cb0fa
do not set autorange to false in constraints.handleDefaults for paria…
archmoj 8e707c6
test partial ranges on matching axes
archmoj c6a147f
Update src/plots/cartesian/layout_attributes.js
archmoj 1f5b819
update schema
archmoj cc03cf8
Update src/plots/cartesian/layout_attributes.js
archmoj 51ca21e
update schema
archmoj 4527d5d
Merge branch 'master' into autorange-bounds
archmoj be1d805
keep _rangeInitial0 & _rangeInitial1 instead of _rangeInitial array
archmoj a7ce254
fix double click interactions for partial ranges
archmoj fbe1fb9
add jasmine test
archmoj f0d48e6
revisit axReverse in autorange
archmoj 5d4f665
fix double click on min reversed and max reversed cases
archmoj faccfc6
validate partial ranges and set autorange true for invalid partial ra…
archmoj 7776305
handle invalid range and reversed autorange
archmoj 30a692e
do not accept partial ranges if autorange is set to true
archmoj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this isn't necessarily true anymore 😎