8000 On-par autorange for scattergl by etpinard · Pull Request #2404 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

On-par autorange for scattergl #2404

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 9 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
update jasmine tests for new scattergl auto-ranges
  • Loading branch information
etpinard committed Feb 26, 2018
commit 36b4e2587bb7e1161081b9fed71f46934cc39e77
15 changes: 13 additions & 2 deletions test/jasmine/tests/gl2d_click_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,22 @@ describe('@gl Test hover and click interactions', function() {

describe('@noCI @gl Test gl2d lasso/select:', function() {
var mockFancy = require('@mocks/gl2d_14.json');
delete mockFancy.layout.xaxis.autorange;
delete mockFancy.layout.yaxis.autorange;
mockFancy.layout.xaxis.range = [-2.951309064136961, 2.0954721318818916];
mockFancy.layout.yaxis.range = [-0.9248866483012275, 1.3232607344525835];

var mockFast = Lib.extendDeep({}, mockFancy, {
data: [{mode: 'markers'}],
layout: {
xaxis: {type: 'linear'},
yaxis: {type: 'linear'}
xaxis: {
type: 'linear',
range: [-3.869222222222223, 73.55522222222223]
},
yaxis: {
type: 'linear',
range: [-0.7402222222222222, 17.144222222222222]
}
}
});

Expand Down
11 changes: 5 additions & 6 deletions test/jasmine/tests/gl2d_plot_interact_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ describe('@gl Test gl plot side effects', function() {

describe('@gl Test gl2d plots', function() {
var gd;

var mock = require('@mocks/gl2d_10.json');

beforeEach(function() {
Expand Down Expand Up @@ -255,9 +254,9 @@ describe('@gl Test gl2d plots', function() {
var relayoutCallback = jasmine.createSpy('relayoutCallback');

var originalX = [-0.3037383177570093, 5.303738317757009];
var originalY = [-0.5, 6.1];
var newX = [-0.5, 5];
var newY = [-1.7, 4.95];
var originalY = [-0.5806379476536665, 6.218528262566369];
var newX = [-0.5516431924882629, 5.082159624413145];
var newY = [-1.7947747709072441, 5.004391439312791];
var precision = 1;

Plotly.newPlot(gd, _mock)
Expand Down Expand Up @@ -584,8 +583,8 @@ describe('@gl Test gl2d plots', function() {
});
})
.then(function() {
expect(gd.layout.xaxis.range).toBeCloseToArray([-7.6, 23.6], 1);
expect(gd.layout.yaxis.range).toBeCloseToArray([0.2, 15.8], 1);
expect(gd.layout.xaxis.range).toBeCloseToArray([-8.2, 24.2], 1);
expect(gd.layout.yaxis.range).toBeCloseToArray([-0.12, 16.1], 1);
})
.catch(fail)
.then(done);
Expand Down
0