8000 Fix multitransform test · TravelTile/plotly.js@1543892 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1543892

Browse files
committed
Fix multitransform test
1 parent 3cc16ba commit 1543892

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

test/jasmine/tests/transform_multi_test.js

Lines changed: 35 additions & 5 deletions
< 58C8 td data-grid-cell-id="diff-6f77d9bd8f901c22fc626b632c12695a5ee07ea469d0728fd958b758fda26196-511-539-1" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">539
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,13 @@ describe('multiple transforms:', function() {
225225
transforms: [{
226226
type: 'groupby',
227227
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a'],
228-
style: { a: {marker: {color: 'red'}}, b: {marker: {color: 'blue'}} }
228+
style: [{
229+
target: 'a',
230+
value: {marker: {color: 'red'}},
231+
}, {
232+
target: 'b',
233+
value: {marker: {color: 'blue'}}
234+
}]
229235
}, {
230236
type: 'filter',
231237
operation: '>'
@@ -239,7 +245,13 @@ describe('multiple transforms:', function() {
239245
transforms: [{
240246
type: 'groupby',
241247
groups: ['b', 'a', 'b', 'b', 'b', 'a', 'a'],
242-
style: { a: {marker: {color: 'green'}}, b: {marker: {color: 'black'}} }
248+
style: [{
249+
target: 'a',
250+
value: {marker: {color: 'green'}}
251+
}, {
252+
target: 'b',
253+
value: {marker: {color: 'black'}}
254+
}]
243255
}, {
244256
type: 'filter',
245257
operation: '<',
@@ -329,7 +341,13 @@ describe('multiple transforms:', function() {
329341
expect(gd._fullData[1].marker.opacity).toEqual(1);
330342

331343
return Plotly.restyle(gd, {
332-
'transforms[0].style': { a: {marker: {color: 'green'}}, b: {marker: {color: 'red'}} },
344+
'transforms[0].style': [[{
345+
target: 'a',
346+
value: {marker: {color: 'green'}}
347+
}, {
348+
target: 'b',
349+
value: {marker: {color: 'red'}}
350+
}]],
333351
'marker.opacity': 0.4
334352
});
335353
}).then(function() {
@@ -437,7 +455,13 @@ describe('multiple traces with transforms:', function() {
437455
transforms: [{
438456
type: 'groupby',
439457
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a'],
440-
style: { a: {marker: {color: 'red'}}, b: {marker: {color: 'blue'}} }
458+
style: [{
459+
target: 'a',
460+
value: {marker: {color: 'red'}},
461+
}, {
462+
target: 'b',
463+
value: {marker: {color: 'blue'}}
464+
}]
441465
}, {
442466
type: 'filter',
443467
operation: '>'
@@ -508,7 +532,13 @@ describe('multiple traces with transforms:', function() {
508532
});
509533

510534
return Plotly.restyle(gd, {
511-
'transforms[0].style': { a: {marker: {color: 'green'}}, b: {marker: {color: 'red'}} },
535+
'transforms[0].style': [[{
536+
target: 'a',
537+
value: {marker: {color: 'green'}},
538+
}, {
+
target: 'b',
540+
value: {marker: {color: 'red'}}
541+
}]],
512542
'marker.opacity': [0.4, 0.6]
513543
});
514544
}).then(function() {

0 commit comments

Comments
 (0)
0