Skip to content

Commit 5765f66

Browse files
committed
groupby generalization - update test cases
1 parent c6355e8 commit 5765f66

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/jasmine/tests/transform_groupby_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('one-to-many transforms:', function() {
2020
transforms: [{
2121
type: 'groupby',
2222
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a'],
23-
groupColors: { a: 'red', b: 'blue' }
23+
style: { a: {marker: {color: 'red'}}, b: {marker: {color: 'blue'}} }
2424
}]
2525
}];
2626

@@ -31,7 +31,7 @@ describe('one-to-many transforms:', function() {
3131
transforms: [{
3232
type: 'groupby',
3333
groups: ['b', 'a', 'b', 'b', 'b', 'a', 'a'],
34-
groupColors: { a: 'green', b: 'black' }
34+
style: { a: {marker: {color: 'green'}}, b: {marker: {color: 'black'}} }
3535
}]
3636
}];
3737

@@ -93,7 +93,7 @@ describe('one-to-many transforms:', function() {
9393
expect(gd._fullData[1].marker.opacity).toEqual(1);
9494

9595
return Plotly.restyle(gd, {
96-
'transforms[0].groupColors': { a: 'green', b: 'red' },
96+
'transforms[0].style': { a: {marker: {color: 'green'}}, b: {marker: {color: 'red'}} },
9797
'marker.opacity': 0.4
9898
});
9999
}).then(function() {

test/jasmine/tests/transform_multi_test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('multiple transforms:', function() {
2222
transforms: [{
2323
type: 'groupby',
2424
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a'],
25-
groupColors: { a: 'red', b: 'blue' }
25+
style: { a: {marker: {color: 'red'}}, b: {marker: {color: 'blue'}} }
2626
}, {
2727
type: 'filter',
2828
operation: '>'
@@ -36,7 +36,7 @@ describe('multiple transforms:', function() {
3636
transforms: [{
3737
type: 'groupby',
3838
groups: ['b', 'a', 'b', 'b', 'b', 'a', 'a'],
39-
groupColors: { a: 'green', b: 'black' }
39+
style: { a: {marker: {color: 'green'}}, b: {marker: {color: 'black'}} }
4040
}, {
4141
type: 'filter',
4242
operation: '<',
@@ -126,7 +126,7 @@ describe('multiple transforms:', function() {
126126
expect(gd._fullData[1].marker.opacity).toEqual(1);
127127

128128
return Plotly.restyle(gd, {
129-
'transforms[0].groupColors': { a: 'green', b: 'red' },
129+
'transforms[0].style': { a: {marker: {color: 'green'}}, b: {marker: {color: 'red'}} },
130130
'marker.opacity': 0.4
131131
});
132132
}).then(function() {
@@ -234,7 +234,7 @@ describe('multiple traces with transforms:', function() {
234234
transforms: [{
235235
type: 'groupby',
236236
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a'],
237-
groupColors: { a: 'red', b: 'blue' }
237+
style: { a: {marker: {color: 'red'}}, b: {marker: {color: 'blue'}} }
238238
}, {
239239
type: 'filter',
240240
operation: '>'
@@ -305,7 +305,7 @@ describe('multiple traces with transforms:', function() {
305305
});
306306

307307
return Plotly.restyle(gd, {
308-
'transforms[0].groupColors': { a: 'green', b: 'red' },
308+
'transforms[0].style': { a: {marker: {color: 'green'}}, b: {marker: {color: 'red'}} },
309309
'marker.opacity': [0.4, 0.6]
310310
});
311311
}).then(function() {

0 commit comments

Comments
 (0)