Skip to content

Commit 41c9e0f

Browse files
committed
Infinite chart. Setable rhythm for animations.
1 parent 1d52836 commit 41c9e0f

File tree

1 file changed

+63
-39
lines changed

1 file changed

+63
-39
lines changed

test/integration/test_cases/web_content/infinite_chart/infinite_2.mjs

Lines changed: 63 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { data } from '/test/integration/test_data/infinite_data.js';
2-
2+
let step = 0;
3+
let targetstep = -1;
34
const testSteps = [
45
chart => chart.animate({
56
data: data,
@@ -47,7 +48,7 @@ const testSteps = [
4748
}
4849
}
4950
}
50-
, '1400ms'),
51+
, step++ < targetstep ?'100ms':'1400ms'),
5152
chart => chart.animate({
5253
config: {
5354
channels: {
@@ -65,7 +66,7 @@ const testSteps = [
6566
}
6667
}
6768
}
68-
, '1400ms'),
69+
, step++ < targetstep ?'100ms':'1400ms'),
6970
chart => chart.animate({
7071
config: {
7172
channels: {
@@ -101,7 +102,7 @@ const testSteps = [
101102
}
102103
}
103104
}
104-
, '1400ms'),
105+
, step++ < targetstep ?'100ms':'1400ms'),
105106
chart => chart.animate({
106107
config: {
107108
channels: {
@@ -110,7 +111,7 @@ const testSteps = [
110111
// title: '4'
111112
}
112113
}
113-
, '1400ms'),
114+
, step++ < targetstep ?'100ms':'1400ms'),
114115
chart => chart.animate({
115116
config: {
116117
channels: {
@@ -134,7 +135,7 @@ const testSteps = [
134135
}
135136
}
136137
}
137-
, '1400ms'),
138+
, step++ < targetstep ?'100ms':'1400ms'),
138139
chart => chart.animate({
139140
config: {
140141
channels: {
@@ -153,7 +154,7 @@ const testSteps = [
153154
}
154155
}
155156
}
156-
, '1400ms'),
157+
, step++ < targetstep ?'100ms':'1400ms'),
157158
chart => chart.animate({
158159
config: {
159160
channels: {
@@ -171,7 +172,7 @@ const testSteps = [
171172
}
172173
}
173174
}
174-
, '1400ms'),
175+
, step++ < targetstep ?'100ms':'1400ms'),
175176
chart => chart.animate({
176177
config: {
177178
channels: {
@@ -181,7 +182,7 @@ const testSteps = [
181182
// title: '8'
182183
}
183184
}
184-
, '1400ms'),
185+
, step++ < targetstep ?'100ms':'1400ms'),
185186
chart => chart.animate({
186187
config: {
187188
channels: {
@@ -191,7 +192,7 @@ const testSteps = [
191192
// title: '9'
192193
}
193194
}
194-
, '1400ms'),
195+
, step++ < targetstep ?'100ms':'1400ms'),
195196
chart => chart.animate({
196197
config: {
197198
channels: {
@@ -201,7 +202,7 @@ const testSteps = [
201202
// title: '10'
202203
}
203204
}
204-
, '1400ms'),
205+
, step++ < targetstep ?'100ms':'1400ms'),
205206
chart => chart.animate({
206207
config: {
207208
channels: {
@@ -211,7 +212,7 @@ const testSteps = [
211212
// title: '11'
212213
}
213214
}
214-
, '1400ms'),
215+
, step++ < targetstep ?'100ms':'1400ms'),
215216
chart => chart.animate({
216217
config: {
217218
channels: {
@@ -237,7 +238,7 @@ const testSteps = [
237238
}
238239
}
239240
}
240-
, '1400ms'),
241+
, step++ < targetstep ?'100ms':'1400ms'),
241242
chart => chart.animate({
242243
config: {
243244
channels: {
@@ -247,7 +248,7 @@ const testSteps = [
247248
// title: '13'
248249
}
249250
}
250-
, '1400ms'),
251+
, step++ < targetstep ?'100ms':'1400ms'),
251252
chart => chart.animate({
252253
config: {
253254
channels: {
@@ -257,7 +258,7 @@ const testSteps = [
257258
// title: '14'
258259
}
259260
}
260-
, '1400ms'),
261+
, step++ < targetstep ?'100ms':'1400ms'),
261262
chart => chart.animate({
262263
config: {
263264
channels: {
@@ -275,7 +276,7 @@ const testSteps = [
275276
}
276277
}
277278
}
278-
, '1400ms'),
279+
, step++ < targetstep ?'100ms':'1400ms'),
279280
chart => chart.animate({
280281
config: {
281282
channels: {
@@ -292,7 +293,7 @@ const testSteps = [
292293
}
293294
}
294295
}
295-
, '1400ms'),
296+
, step++ < targetstep ?'100ms':'1400ms'),
296297
chart => chart.animate({
297298
config: {
298299
channels: {
@@ -314,7 +315,7 @@ const testSteps = [
314315
}
315316
}
316317
}
317-
, '1400ms'),
318+
, step++ < targetstep ?'100ms':'1400ms'),
318319
chart => chart.animate({
319320
config: {
320321
channels: {
@@ -343,7 +344,7 @@ const testSteps = [
343344
}
344345
}
345346
}
346-
, '1400ms'),
347+
, step++ < targetstep ?'100ms':'1400ms'),
347348
chart => chart.animate({
348349
config: {
349350
channels: {
@@ -360,26 +361,43 @@ const testSteps = [
360361
}
361362
}
362363
}
363-
, '1400ms'),
364+
, step++ < targetstep ?'100ms':'1400ms'),
364365
chart => chart.animate({
365366
config: {
366367
channels: {
367368
x: { set: ['Value 1', 'Joy factors', 'Region', 'Country code'], range: { max: '100%' } },
368369
y: { set: null, range: { min: '-200%', max: '100%' } }
369370
},
371+
// title: '20'
372+
}
373+
}
374+
, {duration:step++ < targetstep ?'100ms':'1400ms',
375+
x:{delay: 0},
376+
y:{delay: 0}}),
377+
chart => chart.animate({
378+
config: {
379+
channels: {
380+
x: { set: ['Value 1', 'Joy factors', 'Region', 'Country code'], range: { max: '100%' } },
381+
y: { set: null, range: { min: '0%', max: '100%' } }
382+
},
370383
// title: '20',
371-
coordSystem: 'cartesian'
384+
coordSystem: 'cartesian'
385+
},
386+
style: {
387+
plot: {
388+
marker: {
389+
rectangleSpacing: null
390+
}
372391
}
373392
}
374-
, '1400ms'),
393+
}, step++ < targetstep ?'100ms':'1400ms'),
375394
chart => chart.animate({
376395
config: {
377396
channels: {
378397
x: { set: ['Value 1', 'Joy factors', 'Country code'], range: { max: '100%' } }, // regiont levesz
379-
y: { set: null, range: { min: '-200%', max: '100%' } }
398+
y: { set: null, range: { min: '0%', max: '100%' } }
380399
},
381-
// title: '21',
382-
coordSystem: 'cartesian'
400+
// title: '21'
383401
},
384402
style: {
385403
plot: {
@@ -389,7 +407,7 @@ const testSteps = [
389407
}
390408
}
391409
}
392-
, '400ms'),
410+
, step++ < targetstep ?'100ms':'100ms'),
393411
chart => chart.animate({
394412
config: {
395413
channels: {
@@ -406,7 +424,7 @@ const testSteps = [
406424
}
407425
}
408426
}
409-
, '1400ms'),
427+
, {duration:step++ < targetstep ?'100ms':'1400ms',style:{delay: '1.5s'}}),
410428
chart => chart.animate({
411429
config: {
412430
channels: {
@@ -425,7 +443,7 @@ const testSteps = [
425443
}
426444
}
427445
}
428-
, '1400ms'),
446+
, step++ < targetstep ?'100ms':'1400ms'),
429447
chart => chart.animate({
430448
config: {
431449
channels:
@@ -444,7 +462,7 @@ const testSteps = [
444462
}
445463
}
446464
}
447-
, '1400ms'),
465+
, step++ < targetstep ?'100ms':'1400ms'),
448466
chart => chart.animate({
449467
config: {
450468
channels:
@@ -465,7 +483,7 @@ const testSteps = [
465483
}
466484
}
467485
}
468-
, '1400ms'),
486+
, step++ < targetstep ?'100ms':'1400ms'),
469487
chart => chart.animate({
470488
config: {
471489
channels: {
@@ -488,7 +506,7 @@ const testSteps = [
488506
}
489507
}
490508
}
491-
, '1400ms'),
509+
, step++ < targetstep ?'100ms':'1400ms'),
492510
chart => chart.animate({
493511
config: {
494512
channels: {
@@ -513,7 +531,7 @@ const testSteps = [
513531
}
514532
}
515533
}
516-
, '1400ms'),
534+
, step++ < targetstep ?'100ms':'1400ms'),
517535
chart => chart.animate({
518536
config: {
519537
channels:
@@ -538,11 +556,14 @@ const testSteps = [
538556
circleMinRadius: 0.001,
539557
circleMaxRadius: 0.025,
540558
colorPalette: '#ee1b22FF #cecf07FF #01abf6FF #0ca749FF',
559+
fillOpacity: 0.1,
560+
borderOpacity: 0.1,
561+
borderWidth: 0
541562
}
542563
}
543564
}
544565
}
545-
, '1400ms'),
566+
, step++ < targetstep ?'100ms':'1400ms'),
546567
chart => chart.animate({
547568
config: {
548569
channels:
@@ -561,7 +582,7 @@ const testSteps = [
561582
split: false
562583
}
563584
}
564-
, '1400ms'),
585+
, step++ < targetstep ?'100ms':'1400ms'),
565586
chart => chart.animate({
566587
config: {
567588
channels:
@@ -582,12 +603,15 @@ const testSteps = [
582603
marker: {
583604
label: {
584605
fontSize: 8
585-
}
606+
},
607+
fillOpacity: null,
608+
borderOpacity: null,
609+
borderWidth: null
586610
}
587611
}
588612
}
589613
}
590-
, '1400ms'),
614+
, step++ < targetstep ?'100ms':'1400ms'),
591615
chart => chart.animate({
592616
config: {
593617
channels:
@@ -603,7 +627,7 @@ const testSteps = [
603627
split: false
604628
}
605629
}
606-
, '1400ms'),
630+
, step++ < targetstep ?'100ms':'1400ms'),
607631
chart => chart.animate({
608632
config: {
609633
channels:
@@ -631,7 +655,7 @@ const testSteps = [
631655
}
632656
}
633657
}
634-
, '1400ms'),
658+
, step++ < targetstep ?'100ms':'1400ms'),
635659
chart => chart.animate({
636660
config: {
637661
channels:
@@ -672,7 +696,7 @@ const testSteps = [
672696
}
673697
}
674698
}
675-
, '1400ms')
699+
, step++ < targetstep ?'100ms':'1400ms')
676700
];
677701

678702
export default testSteps;

0 commit comments

Comments
 (0)