Skip to content

Commit d9f0002

Browse files
committed
improve funnel test - correct orientation, etc
1 parent 8c1e7a1 commit d9f0002

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/jasmine/tests/funnel_test.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1035,13 +1035,13 @@ describe('A funnel plot', function() {
10351035
});
10361036

10371037
it('handle BADNUM positions', function(done) {
1038-
var y1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
1039-
var y2 = y1; // no transition now
1038+
var x1 = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
1039+
var x2 = x1; // no transition now
10401040
var mockCopy = {
10411041
data: [
10421042
{
10431043
type: 'funnel',
1044-
x: [
1044+
y: [
10451045
0,
10461046
1,
10471047
'',
@@ -1054,24 +1054,24 @@ describe('A funnel plot', function() {
10541054
9,
10551055
10
10561056
],
1057-
y: y1
1057+
x: x1
10581058
}
10591059
],
10601060
layout: {
1061-
width: 400,
1062-
height: 300
1061+
width: 800,
1062+
height: 600
10631063
}
10641064
};
10651065

10661066
var barTests = [
1067-
[0, '.point path', 'attr', 'd', ['M12,12V108H12V12Z', 'M12,12V108H23V12Z', 'M120,12V108H120V12Z', 'M120,12V108H120V12Z', 'M120,12V108H120V12Z', 'M120,12V108H120V12Z', 'M120,12V108H120V12Z', 'M120,12V108H120V12Z', 'M120,12V108H120V12Z', 'M23,12V108H120V12Z', 'M120,12V108H228V12Z']]
1067+
[0, '.point path', 'attr', 'd', ['M245,4V34H395V4Z', 'M251,42V73H389V42Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M306,347V378H334V347Z', 'M313,386V416H327V386Z']]
10681068
];
10691069

10701070
var connectorTests = [
1071-
[0, '.regions path', 'attr', 'd', ['M12,108L12,12H23L12,108Z', 'M23,108L120,12H228L120,108Z', 'M0,0Z']]
1071+
[0, '.regions path', 'attr', 'd', ['M245,34L251,42H389L395,34Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M0,0Z', 'M306,378L313,386H327L334,378Z', 'M0,0Z']]
10721072
];
10731073

1074-
var animateOpts = {data: [{y: y2}]};
1074+
var animateOpts = {data: [{x: x2}]};
10751075
var transitionOpts = false; // use default
10761076

10771077
checkTransition(gd, mockCopy, animateOpts, transitionOpts, barTests)

0 commit comments

Comments
 (0)