8000 Add bounds to range and autorange of cartesian, gl3d and radial axes by archmoj · Pull Request #6547 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

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 occ 8000 asionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Aug 24, 2023
Merged
Changes from 1 commit
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 Mar 31, 2023
e981da5
test autorange min max on cartesian gl3d & radial axes
archmoj Mar 31, 2023
c7b57f5
add range min and max to cartesian, gl3d and radial axes
archmoj Apr 3, 2023
8c2320d
draft log for PR 6547
archmoj Apr 3, 2023
3cda56a
Merge remote-tracking branch 'origin/master' into autorange-bounds
archmoj May 2, 2023
3f2e6e7
rename autorange clip min max
archmoj May 2, 2023
cf7b264
add autorange exact min and max
archmoj May 2, 2023
78b5160
centralized function
archmoj May 2, 2023
8c61f11
add autorange include
archmoj May 2, 2023
c528781
revisit autorange include options
archmoj May 2, 2023
113ec69
centralize autorange options defaults
archmoj May 2, 2023
c7153ca
ensure min < max in case both defined
archmoj May 2, 2023
ab9d1cc
limit range during scattergl update
archmoj May 3, 2023
16a8213
limit corner draggers considering rangemin or rangemax
archmoj May 5, 2023
4d891b3
ensure ranges stay in bound after setting in dragAxList
archmoj May 10, 2023
d787b9f
revise attributes
archmoj May 17, 2023
cb55c08
introduce null range and new autorange options
archmoj May 18, 2023
595a00c
use null in ranges to set defaults
archmoj May 18, 2023
fc79461
declare isReversed() function
archmoj May 18, 2023
c38ed70
use null ranges as default values for autorange eoptions min/max allowed
archmoj May 23, 2023
f8a0501
Merge branch 'master' into autorange-bounds
archmoj May 30, 2023
14ea726
Merge remote-tracking branch 'origin/master' into autorange-bounds
archmoj Jul 19, 2023
13dfe31
update draftlog
archmoj Jul 20, 2023
308ae20
Merge remote-tracking branch 'origin/master' into autorange-bounds
archmoj Jul 25, 2023
e4f906c
Update src/plots/cartesian/layout_attributes.js
archmoj Jul 25, 2023
04b8efa
update schema test
archmoj Jul 25, 2023
086282c
fix hasValidMinAndMax for autorangeoptions allowed attrs
archmoj Jul 26, 2023
699fb78
keep null items in range when calling cleanRange
archmoj Aug 1, 2023
36cb0fa
do not set autorange to false in constraints.handleDefaults for paria…
archmoj Aug 1, 2023
8e707c6
test partial ranges on matching axes
archmoj Aug 1, 2023
c6a147f
Update src/plots/cartesian/layout_attributes.js
archmoj Aug 2, 2023
1f5b819
update schema
archmoj Aug 2, 2023
cc03cf8
Update src/plots/cartesian/layout_attributes.js
archmoj Aug 2, 2023
51ca21e
update schema
archmoj Aug 2, 2023
4527d5d
Merge branch 'master' into autorange-bounds
archmoj Aug 11, 2023
be1d805
keep _rangeInitial0 & _rangeInitial1 instead of _rangeInitial array
archmoj Aug 9, 2023
a7ce254
fix double click interactions for partial ranges
archmoj Aug 18, 2023
fbe1fb9
add jasmine test
archmoj Aug 18, 2023
f0d48e6
revisit axReverse in autorange
archmoj Aug 18, 2023
5d4f665
fix double click on min reversed and max reversed cases
archmoj Aug 18, 2023
faccfc6
validate partial ranges and set autorange true for invalid partial ra…
archmoj Aug 22, 2023
7776305
handle invalid range and reversed autorange
archmoj Aug 23, 2023
30a692e
do not accept partial ranges if autorange is set to true
archmoj Aug 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add jasmine test
  • Loading branch information
archmoj committed Aug 18, 2023
commit fbe1fb9d1dacf33fe21b3b245e340c4dc3005db4
29 changes: 29 additions & 0 deletions test/jasmine/tests/click_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,35 @@ describe('Test click interactions:', function() {
})
.then(done, done.fail);
});

it('when set to \'reset+autorange\' (the default) should autosize on 1st and 2nd double clicks (case of partial ranges)', function(done) {
mockCopy = setRanges(mockCopy);

Plotly.newPlot(gd, [{
y: [1, 2, 3, 4]}
], {
xaxis: {range: [1, null]},
yaxis: {range: [null, 3]},
width: 600,
height: 600
}).then(function() {
expect(gd.layout.xaxis.range).toBeCloseToArray([1, 3.2]);
expect(gd.layout.yaxis.range).toBeCloseToArray([0.8, 3]);

return doubleClick(300, 300);
})
.then(function() {
expect(gd.layout.xaxis.range).toBeCloseToArray([-0.2, 3.2]);
expect(gd.layout.yaxis.range).toBeCloseToArray([0.8, 4.2]);

return doubleClick(300, 300);
})
.then(function() {
expect(gd.layout.xaxis.range).toBeCloseToArray([1, 3.2]);
expect(gd.layout.yaxis.range).toBeCloseToArray([0.8, 3]);
})
.then(done, done.fail);
});
});

describe('zoom interactions', function() {
Expand Down
0