@opendata-ai/openchart-engine 6.19.3 → 6.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.js +865 -3729
  3. package/dist/index.js.map +1 -1
  4. package/package.json +2 -2
  5. package/src/__tests__/__snapshots__/compile-snapshot.test.ts.snap +1989 -0
  6. package/src/__tests__/axes.test.ts +65 -0
  7. package/src/__tests__/compile-snapshot.test.ts +156 -0
  8. package/src/__tests__/legend.test.ts +39 -0
  9. package/src/charts/__tests__/registry.test.ts +6 -0
  10. package/src/charts/_shared/__tests__/density-filter.test.ts +32 -0
  11. package/src/charts/_shared/density-filter.ts +26 -0
  12. package/src/charts/_shared/format-label-value.ts +15 -0
  13. package/src/charts/bar/__tests__/gradient-orient.test.ts +127 -0
  14. package/src/charts/bar/compute.ts +6 -11
  15. package/src/charts/bar/labels.ts +4 -15
  16. package/src/charts/builtin.ts +64 -0
  17. package/src/charts/column/compute.ts +6 -11
  18. package/src/charts/column/labels.ts +4 -19
  19. package/src/charts/dot/labels.ts +4 -19
  20. package/src/charts/pie/labels.ts +4 -6
  21. package/src/charts/registry.ts +6 -0
  22. package/src/compile/__tests__/color-scale-range.test.ts +79 -0
  23. package/src/compile/__tests__/data-clip.test.ts +59 -0
  24. package/src/compile/__tests__/watermark-obstacle.test.ts +93 -0
  25. package/src/compile/color-scale-range.ts +38 -0
  26. package/src/compile/data-clip.ts +33 -0
  27. package/src/compile/watermark-obstacle.ts +54 -0
  28. package/src/compile.ts +20 -97
  29. package/src/layout/axes/thinning.ts +96 -0
  30. package/src/layout/axes/ticks.ts +266 -0
  31. package/src/layout/axes.ts +148 -249
  32. package/src/legend/compute.ts +6 -51
  33. package/src/legend/wrap.ts +94 -0
  34. package/src/sankey/__tests__/node-label-wrap.test.ts +114 -0
  35. package/src/sankey/__tests__/node-sort.test.ts +45 -0
  36. package/src/sankey/compile-sankey.ts +5 -20
@@ -0,0 +1,1989 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`compileChart snapshot (Step 7 oracle) > clipped-domain bar chart (data outside scale.domain filtered) 1`] = `
4
+ {
5
+ "a11y": {
6
+ "altText": "Bar chart showing Clipped Values (5 data points)",
7
+ "dataTableFallback": [
8
+ [
9
+ "value",
10
+ "name",
11
+ ],
12
+ [
13
+ 10,
14
+ "A",
15
+ ],
16
+ [
17
+ 25,
18
+ "B",
19
+ ],
20
+ [
21
+ 40,
22
+ "C",
23
+ ],
24
+ [
25
+ 75,
26
+ "D",
27
+ ],
28
+ [
29
+ 90,
30
+ "E",
31
+ ],
32
+ ],
33
+ "keyboardNavigable": true,
34
+ "role": "img",
35
+ },
36
+ "animation": undefined,
37
+ "annotations": [],
38
+ "area": {
39
+ "height": 297.4,
40
+ "width": 541.73,
41
+ "x": 35.269999999999996,
42
+ "y": 59.6,
43
+ },
44
+ "axes": {
45
+ "x": {
46
+ "domainLine": undefined,
47
+ "end": {
48
+ "x": 577,
49
+ "y": 357,
50
+ },
51
+ "gridlines": [],
52
+ "label": undefined,
53
+ "labelFlush": undefined,
54
+ "labelOverlap": undefined,
55
+ "labelPadding": undefined,
56
+ "labelStyle": {
57
+ "fill": "#1d1d1d",
58
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
59
+ "fontSize": 13,
60
+ "fontWeight": 500,
61
+ "lineHeight": 1.3,
62
+ },
63
+ "offset": undefined,
64
+ "orient": undefined,
65
+ "start": {
66
+ "x": 35.269999999999996,
67
+ "y": 357,
68
+ },
69
+ "tickAngle": undefined,
70
+ "tickLabelStyle": {
71
+ "fill": "#888888",
72
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
73
+ "fontSize": 11,
74
+ "fontVariant": "tabular-nums",
75
+ "fontWeight": 400,
76
+ "lineHeight": 1.2,
77
+ },
78
+ "tickMarks": undefined,
79
+ "ticks": [
80
+ {
81
+ "label": "0",
82
+ "position": 35.269999999999996,
83
+ "value": 0,
84
+ },
85
+ {
86
+ "label": "20",
87
+ "position": 251.96200000000002,
88
+ "value": 20,
89
+ },
90
+ {
91
+ "label": "40",
92
+ "position": 468.654,
93
+ "value": 40,
94
+ },
95
+ ],
96
+ "titlePadding": undefined,
97
+ },
98
+ "y": {
99
+ "domainLine": undefined,
100
+ "end": {
101
+ "x": 35.269999999999996,
102
+ "y": 357,
103
+ },
104
+ "gridlines": [
105
+ {
106
+ "major": true,
107
+ "position": 297.0761194029851,
108
+ },
109
+ {
110
+ "major": true,
111
+ "position": 208.3,
112
+ },
113
+ {
114
+ "major": true,
115
+ "position": 119.52388059701492,
116
+ },
117
+ ],
118
+ "label": undefined,
119
+ "labelFlush": undefined,
120
+ "labelOverlap": undefined,
121
+ "labelPadding": undefined,
122
+ "labelStyle": {
123
+ "fill": "#1d1d1d",
124
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
125
+ "fontSize": 13,
126
+ "fontWeight": 500,
127
+ "lineHeight": 1.3,
128
+ },
129
+ "offset": undefined,
130
+ "orient": undefined,
131
+ "start": {
132
+ "x": 35.269999999999996,
133
+ "y": 59.6,
134
+ },
135
+ "tickAngle": undefined,
136
+ "tickLabelStyle": {
137
+ "fill": "#888888",
138
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
139
+ "fontSize": 11,
140
+ "fontVariant": "tabular-nums",
141
+ "fontWeight": 400,
142
+ "lineHeight": 1.2,
143
+ },
144
+ "tickMarks": undefined,
145
+ "ticks": [
146
+ {
147
+ "label": "A",
148
+ "position": 297.0761194029851,
149
+ "value": "A",
150
+ },
151
+ {
152
+ "label": "B",
153
+ "position": 208.3,
154
+ "value": "B",
155
+ },
156
+ {
157
+ "label": "C",
158
+ "position": 119.52388059701492,
159
+ "value": "C",
160
+ },
161
+ ],
162
+ "titlePadding": undefined,
163
+ },
164
+ },
165
+ "chrome": {
166
+ "bottomHeight": 0,
167
+ "title": {
168
+ "maxWidth": 561,
169
+ "style": {
170
+ "dominantBaseline": "hanging",
171
+ "fill": "#333333",
172
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
173
+ "fontSize": 22,
174
+ "fontWeight": 700,
175
+ "lineHeight": 1.3,
176
+ "textAnchor": "start",
177
+ },
178
+ "text": "Clipped Values",
179
+ "x": 17,
180
+ "y": 17,
181
+ },
182
+ "topHeight": 36.6,
183
+ },
184
+ "dimensions": {
185
+ "height": 400,
186
+ "width": 600,
187
+ },
188
+ "legend": {
189
+ "bounds": {
190
+ "height": 0,
191
+ "width": 0,
192
+ "x": 0,
193
+ "y": 0,
194
+ },
195
+ "entries": [],
196
+ "entryGap": 16,
197
+ "labelStyle": {
198
+ "fill": "#1d1d1d",
199
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
200
+ "fontSize": 11,
201
+ "fontWeight": 400,
202
+ "lineHeight": 1.3,
203
+ },
204
+ "position": "top",
205
+ "swatchGap": 6,
206
+ "swatchSize": 12,
207
+ },
208
+ "marks": [
209
+ {
210
+ "aria": {
211
+ "label": "A: 10",
212
+ },
213
+ "cornerRadius": 2,
214
+ "data": {
215
+ "name": "A",
216
+ "value": 10,
217
+ },
218
+ "fill": "#1b7fa3",
219
+ "height": 57.7044776119403,
220
+ "label": {
221
+ "connector": undefined,
222
+ "style": {
223
+ "dominantBaseline": "central",
224
+ "fill": "#ffffff",
225
+ "fontFamily": "system-ui, -apple-system, sans-serif",
226
+ "fontSize": 11,
227
+ "fontWeight": 600,
228
+ "lineHeight": 1.2,
229
+ "textAnchor": "end",
230
+ },
231
+ "text": "10",
232
+ "visible": true,
233
+ "x": 137.616,
234
+ "y": 297.0761194029851,
235
+ },
236
+ "orient": "horizontal",
237
+ "type": "rect",
238
+ "width": 108.34600000000002,
239
+ "x": 35.269999999999996,
240
+ "y": 268.22388059701495,
241
+ },
242
+ {
243
+ "aria": {
244
+ "label": "B: 25",
245
+ },
246
+ "cornerRadius": 2,
247
+ "data": {
248
+ "name": "B",
249
+ "value": 25,
250
+ },
251
+ "fill": "#1b7fa3",
252
+ "height": 57.7044776119403,
253
+ "label": {
254
+ "connector": undefined,
255
+ "style": {
256
+ "dominantBaseline": "central",
257
+ "fill": "#ffffff",
258
+ "fontFamily": "system-ui, -apple-system, sans-serif",
259
+ "fontSize": 11,
260
+ "fontWeight": 600,
261
+ "lineHeight": 1.2,
262
+ "textAnchor": "end",
263
+ },
264
+ "text": "25",
265
+ "visible": true,
266
+ "x": 300.135,
267
+ "y": 208.3,
268
+ },
269
+ "orient": "horizontal",
270
+ "type": "rect",
271
+ "width": 270.865,
272
+ "x": 35.269999999999996,
273
+ "y": 179.44776119402985,
274
+ },
275
+ {
276
+ "aria": {
277
+ "label": "C: 40",
278
+ },
279
+ "cornerRadius": 2,
280
+ "data": {
281
+ "name": "C",
282
+ "value": 40,
283
+ },
284
+ "fill": "#1b7fa3",
285
+ "height": 57.7044776119403,
286
+ "label": {
287
+ "connector": undefined,
288
+ "style": {
289
+ "dominantBaseline": "central",
290
+ "fill": "#ffffff",
291
+ "fontFamily": "system-ui, -apple-system, sans-serif",
292
+ "fontSize": 11,
293
+ "fontWeight": 600,
294
+ "lineHeight": 1.2,
295
+ "textAnchor": "end",
296
+ },
297
+ "text": "40",
298
+ "visible": true,
299
+ "x": 462.654,
300
+ "y": 119.52388059701492,
301
+ },
302
+ "orient": "horizontal",
303
+ "type": "rect",
304
+ "width": 433.384,
305
+ "x": 35.269999999999996,
306
+ "y": 90.67164179104478,
307
+ },
308
+ ],
309
+ "theme": {
310
+ "borderRadius": 4,
311
+ "chrome": {
312
+ "byline": {
313
+ "color": "#999999",
314
+ "fontSize": 12,
315
+ "fontWeight": 400,
316
+ "lineHeight": 1.3,
317
+ },
318
+ "footer": {
319
+ "color": "#999999",
320
+ "fontSize": 12,
321
+ "fontWeight": 400,
322
+ "lineHeight": 1.3,
323
+ },
324
+ "source": {
325
+ "color": "#999999",
326
+ "fontSize": 12,
327
+ "fontWeight": 400,
328
+ "lineHeight": 1.3,
329
+ },
330
+ "subtitle": {
331
+ "color": "#666666",
332
+ "fontSize": 15,
333
+ "fontWeight": 400,
334
+ "lineHeight": 1.4,
335
+ },
336
+ "title": {
337
+ "color": "#333333",
338
+ "fontSize": 22,
339
+ "fontWeight": 700,
340
+ "lineHeight": 1.3,
341
+ },
342
+ },
343
+ "colors": {
344
+ "annotationFill": "rgba(0,0,0,0.04)",
345
+ "annotationText": "#555555",
346
+ "axis": "#888888",
347
+ "background": "#ffffff",
348
+ "categorical": [
349
+ "#1b7fa3",
350
+ "#c44e52",
351
+ "#6a9f58",
352
+ "#d47215",
353
+ "#507e79",
354
+ "#9a6a8d",
355
+ "#c4636b",
356
+ "#9c755f",
357
+ "#a88f22",
358
+ "#858078",
359
+ ],
360
+ "diverging": {
361
+ "brownTeal": [
362
+ "#8c510a",
363
+ "#bf812d",
364
+ "#dfc27d",
365
+ "#f6e8c3",
366
+ "#80cdc1",
367
+ "#35978f",
368
+ "#01665e",
369
+ ],
370
+ "redBlue": [
371
+ "#b2182b",
372
+ "#d6604d",
373
+ "#f4a582",
374
+ "#f7f7f7",
375
+ "#92c5de",
376
+ "#4393c3",
377
+ "#2166ac",
378
+ ],
379
+ },
380
+ "gridline": "#e8e8e8",
381
+ "sequential": {
382
+ "blue": [
383
+ "#deebf7",
384
+ "#c6dbef",
385
+ "#9ecae1",
386
+ "#6baed6",
387
+ "#3182bd",
388
+ "#08519c",
389
+ ],
390
+ "green": [
391
+ "#e5f5e0",
392
+ "#c7e9c0",
393
+ "#a1d99b",
394
+ "#74c476",
395
+ "#31a354",
396
+ "#006d2c",
397
+ ],
398
+ "orange": [
399
+ "#fee6ce",
400
+ "#fdd0a2",
401
+ "#fdae6b",
402
+ "#fd8d3c",
403
+ "#e6550d",
404
+ "#a63603",
405
+ ],
406
+ "purple": [
407
+ "#efedf5",
408
+ "#dadaeb",
409
+ "#bcbddc",
410
+ "#9e9ac8",
411
+ "#756bb1",
412
+ "#54278f",
413
+ ],
414
+ },
415
+ "text": "#1d1d1d",
416
+ },
417
+ "fonts": {
418
+ "family": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
419
+ "mono": ""JetBrains Mono", "Fira Code", "Cascadia Code", monospace",
420
+ "sizes": {
421
+ "axisTick": 11,
422
+ "body": 13,
423
+ "small": 11,
424
+ "subtitle": 15,
425
+ "title": 22,
426
+ },
427
+ "weights": {
428
+ "bold": 700,
429
+ "medium": 500,
430
+ "normal": 400,
431
+ "semibold": 600,
432
+ },
433
+ },
434
+ "isDark": false,
435
+ "spacing": {
436
+ "axisMargin": 6,
437
+ "chartToFooter": 8,
438
+ "chromeGap": 4,
439
+ "chromeToChart": 8,
440
+ "padding": 20,
441
+ },
442
+ },
443
+ "tooltipDescriptors": [
444
+ [
445
+ "rect-0",
446
+ {
447
+ "fields": [
448
+ {
449
+ "color": "#1b7fa3",
450
+ "label": "name",
451
+ "value": "A",
452
+ },
453
+ {
454
+ "label": "value",
455
+ "value": "10",
456
+ },
457
+ ],
458
+ "title": "A",
459
+ },
460
+ ],
461
+ [
462
+ "rect-1",
463
+ {
464
+ "fields": [
465
+ {
466
+ "color": "#1b7fa3",
467
+ "label": "name",
468
+ "value": "B",
469
+ },
470
+ {
471
+ "label": "value",
472
+ "value": "25",
473
+ },
474
+ ],
475
+ "title": "B",
476
+ },
477
+ ],
478
+ [
479
+ "rect-2",
480
+ {
481
+ "fields": [
482
+ {
483
+ "color": "#1b7fa3",
484
+ "label": "name",
485
+ "value": "C",
486
+ },
487
+ {
488
+ "label": "value",
489
+ "value": "40",
490
+ },
491
+ ],
492
+ "title": "C",
493
+ },
494
+ ],
495
+ ],
496
+ "watermark": false,
497
+ }
498
+ `;
499
+
500
+ exports[`compileChart snapshot (Step 7 oracle) > legend-heavy multi-series line chart 1`] = `
501
+ {
502
+ "a11y": {
503
+ "altText": "Line chart showing GDP Growth from 2020 to 2021 with 4 series (US, UK, FR, DE) (8 data points)",
504
+ "dataTableFallback": [
505
+ [
506
+ "date",
507
+ "value",
508
+ "country",
509
+ ],
510
+ [
511
+ "2020-01-01",
512
+ 10,
513
+ "US",
514
+ ],
515
+ [
516
+ "2021-01-01",
517
+ 40,
518
+ "US",
519
+ ],
520
+ [
521
+ "2020-01-01",
522
+ 15,
523
+ "UK",
524
+ ],
525
+ [
526
+ "2021-01-01",
527
+ 35,
528
+ "UK",
529
+ ],
530
+ [
531
+ "2020-01-01",
532
+ 8,
533
+ "FR",
534
+ ],
535
+ [
536
+ "2021-01-01",
537
+ 22,
538
+ "FR",
539
+ ],
540
+ [
541
+ "2020-01-01",
542
+ 12,
543
+ "DE",
544
+ ],
545
+ [
546
+ "2021-01-01",
547
+ 28,
548
+ "DE",
549
+ ],
550
+ ],
551
+ "keyboardNavigable": true,
552
+ "role": "img",
553
+ },
554
+ "animation": undefined,
555
+ "annotations": [],
556
+ "area": {
557
+ "height": 322.79999999999995,
558
+ "width": 661.753,
559
+ "x": 42.54,
560
+ "y": 87.6,
561
+ },
562
+ "axes": {
563
+ "x": undefined,
564
+ "y": {
565
+ "domainLine": undefined,
566
+ "end": {
567
+ "x": 42.54,
568
+ "y": 410.4,
569
+ },
570
+ "gridlines": [
571
+ {
572
+ "major": true,
573
+ "position": 410.4,
574
+ },
575
+ {
576
+ "major": true,
577
+ "position": 370.04999999999995,
578
+ },
579
+ {
580
+ "major": true,
581
+ "position": 329.69999999999993,
582
+ },
583
+ {
584
+ "major": true,
585
+ "position": 289.35,
586
+ },
587
+ {
588
+ "major": true,
589
+ "position": 249,
590
+ },
591
+ {
592
+ "major": true,
593
+ "position": 208.64999999999998,
594
+ },
595
+ {
596
+ "major": true,
597
+ "position": 168.29999999999998,
598
+ },
599
+ {
600
+ "major": true,
601
+ "position": 127.94999999999999,
602
+ },
603
+ {
604
+ "major": true,
605
+ "position": 87.6,
606
+ },
607
+ ],
608
+ "label": undefined,
609
+ "labelFlush": undefined,
610
+ "labelOverlap": undefined,
611
+ "labelPadding": undefined,
612
+ "labelStyle": {
613
+ "fill": "#1d1d1d",
614
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
615
+ "fontSize": 13,
616
+ "fontWeight": 500,
617
+ "lineHeight": 1.3,
618
+ },
619
+ "offset": undefined,
620
+ "orient": undefined,
621
+ "start": {
622
+ "x": 42.54,
623
+ "y": 87.6,
624
+ },
625
+ "tickAngle": undefined,
626
+ "tickLabelStyle": {
627
+ "fill": "#888888",
628
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
629
+ "fontSize": 11,
630
+ "fontVariant": "tabular-nums",
631
+ "fontWeight": 400,
632
+ "lineHeight": 1.2,
633
+ },
634
+ "tickMarks": undefined,
635
+ "ticks": [
636
+ {
637
+ "label": "0",
638
+ "position": 410.4,
639
+ "value": 0,
640
+ },
641
+ {
642
+ "label": "5",
643
+ "position": 370.04999999999995,
644
+ "value": 5,
645
+ },
646
+ {
647
+ "label": "10",
648
+ "position": 329.69999999999993,
649
+ "value": 10,
650
+ },
651
+ {
652
+ "label": "15",
653
+ "position": 289.35,
654
+ "value": 15,
655
+ },
656
+ {
657
+ "label": "20",
658
+ "position": 249,
659
+ "value": 20,
660
+ },
661
+ {
662
+ "label": "25",
663
+ "position": 208.64999999999998,
664
+ "value": 25,
665
+ },
666
+ {
667
+ "label": "30",
668
+ "position": 168.29999999999998,
669
+ "value": 30,
670
+ },
671
+ {
672
+ "label": "35",
673
+ "position": 127.94999999999999,
674
+ "value": 35,
675
+ },
676
+ {
677
+ "label": "40",
678
+ "position": 87.6,
679
+ "value": 40,
680
+ },
681
+ ],
682
+ "titlePadding": undefined,
683
+ },
684
+ },
685
+ "chrome": {
686
+ "bottomHeight": 43.6,
687
+ "source": {
688
+ "maxWidth": 755,
689
+ "style": {
690
+ "dominantBaseline": "hanging",
691
+ "fill": "#999999",
692
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
693
+ "fontSize": 12,
694
+ "fontWeight": 400,
695
+ "lineHeight": 1.3,
696
+ "textAnchor": "start",
697
+ },
698
+ "text": "World Bank",
699
+ "x": 20,
700
+ "y": 8,
701
+ },
702
+ "subtitle": {
703
+ "maxWidth": 755,
704
+ "style": {
705
+ "dominantBaseline": "hanging",
706
+ "fill": "#666666",
707
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
708
+ "fontSize": 15,
709
+ "fontWeight": 400,
710
+ "lineHeight": 1.4,
711
+ "textAnchor": "start",
712
+ },
713
+ "text": "Four-country comparison",
714
+ "x": 20,
715
+ "y": 52.6,
716
+ },
717
+ "title": {
718
+ "maxWidth": 755,
719
+ "style": {
720
+ "dominantBaseline": "hanging",
721
+ "fill": "#333333",
722
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
723
+ "fontSize": 22,
724
+ "fontWeight": 700,
725
+ "lineHeight": 1.3,
726
+ "textAnchor": "start",
727
+ },
728
+ "text": "GDP Growth",
729
+ "x": 20,
730
+ "y": 20,
731
+ },
732
+ "topHeight": 61.599999999999994,
733
+ },
734
+ "dimensions": {
735
+ "height": 500,
736
+ "width": 800,
737
+ },
738
+ "legend": {
739
+ "bounds": {
740
+ "height": 85.2,
741
+ "width": 46.54,
742
+ "x": 712.293,
743
+ "y": 87.6,
744
+ },
745
+ "entries": [
746
+ {
747
+ "active": true,
748
+ "color": "#1b7fa3",
749
+ "label": "US",
750
+ "shape": "line",
751
+ },
752
+ {
753
+ "active": true,
754
+ "color": "#c44e52",
755
+ "label": "UK",
756
+ "shape": "line",
757
+ },
758
+ {
759
+ "active": true,
760
+ "color": "#6a9f58",
761
+ "label": "FR",
762
+ "shape": "line",
763
+ },
764
+ {
765
+ "active": true,
766
+ "color": "#d47215",
767
+ "label": "DE",
768
+ "shape": "line",
769
+ },
770
+ ],
771
+ "entryGap": 4,
772
+ "labelStyle": {
773
+ "fill": "#1d1d1d",
774
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
775
+ "fontSize": 11,
776
+ "fontWeight": 400,
777
+ "lineHeight": 1.3,
778
+ },
779
+ "position": "right",
780
+ "swatchGap": 6,
781
+ "swatchSize": 12,
782
+ },
783
+ "marks": [
784
+ {
785
+ "aria": {
786
+ "label": "US: line with 2 data points",
787
+ },
788
+ "data": [
789
+ {
790
+ "country": "US",
791
+ "date": "2020-01-01",
792
+ "value": 10,
793
+ },
794
+ {
795
+ "country": "US",
796
+ "date": "2021-01-01",
797
+ "value": 40,
798
+ },
799
+ ],
800
+ "dataPoints": [
801
+ {
802
+ "datum": {
803
+ "country": "US",
804
+ "date": "2020-01-01",
805
+ "value": 10,
806
+ },
807
+ "tooltip": {
808
+ "fields": [
809
+ {
810
+ "color": "#1b7fa3",
811
+ "label": "country",
812
+ "value": "US",
813
+ },
814
+ {
815
+ "color": undefined,
816
+ "label": "value",
817
+ "value": "10",
818
+ },
819
+ {
820
+ "label": "date",
821
+ "value": "2020",
822
+ },
823
+ ],
824
+ "title": "2020",
825
+ },
826
+ "x": 42.54,
827
+ "y": 329.69999999999993,
828
+ },
829
+ {
830
+ "datum": {
831
+ "country": "US",
832
+ "date": "2021-01-01",
833
+ "value": 40,
834
+ },
835
+ "tooltip": {
836
+ "fields": [
837
+ {
838
+ "color": "#1b7fa3",
839
+ "label": "country",
840
+ "value": "US",
841
+ },
842
+ {
843
+ "color": undefined,
844
+ "label": "value",
845
+ "value": "40",
846
+ },
847
+ {
848
+ "label": "date",
849
+ "value": "2021",
850
+ },
851
+ ],
852
+ "title": "2021",
853
+ },
854
+ "x": 704.293,
855
+ "y": 87.6,
856
+ },
857
+ ],
858
+ "label": {
859
+ "connector": undefined,
860
+ "style": {
861
+ "dominantBaseline": "central",
862
+ "fill": "#1b7fa3",
863
+ "fontFamily": "system-ui, -apple-system, sans-serif",
864
+ "fontSize": 11,
865
+ "fontWeight": 600,
866
+ "lineHeight": 1.2,
867
+ "textAnchor": "start",
868
+ },
869
+ "text": "US",
870
+ "visible": true,
871
+ "x": 710.293,
872
+ "y": 81,
873
+ },
874
+ "opacity": undefined,
875
+ "path": "M42.54,329.7L704.293,87.6",
876
+ "points": [
877
+ {
878
+ "x": 42.54,
879
+ "y": 329.69999999999993,
880
+ },
881
+ {
882
+ "x": 704.293,
883
+ "y": 87.6,
884
+ },
885
+ ],
886
+ "seriesKey": "US",
887
+ "stroke": "#1b7fa3",
888
+ "strokeDasharray": undefined,
889
+ "strokeWidth": 2.5,
890
+ "type": "line",
891
+ },
892
+ {
893
+ "aria": {
894
+ "label": "UK: line with 2 data points",
895
+ },
896
+ "data": [
897
+ {
898
+ "country": "UK",
899
+ "date": "2020-01-01",
900
+ "value": 15,
901
+ },
902
+ {
903
+ "country": "UK",
904
+ "date": "2021-01-01",
905
+ "value": 35,
906
+ },
907
+ ],
908
+ "dataPoints": [
909
+ {
910
+ "datum": {
911
+ "country": "UK",
912
+ "date": "2020-01-01",
913
+ "value": 15,
914
+ },
915
+ "tooltip": {
916
+ "fields": [
917
+ {
918
+ "color": "#c44e52",
919
+ "label": "country",
920
+ "value": "UK",
921
+ },
922
+ {
923
+ "color": undefined,
924
+ "label": "value",
925
+ "value": "15",
926
+ },
927
+ {
928
+ "label": "date",
929
+ "value": "2020",
930
+ },
931
+ ],
932
+ "title": "2020",
933
+ },
934
+ "x": 42.54,
935
+ "y": 289.35,
936
+ },
937
+ {
938
+ "datum": {
939
+ "country": "UK",
940
+ "date": "2021-01-01",
941
+ "value": 35,
942
+ },
943
+ "tooltip": {
944
+ "fields": [
945
+ {
946
+ "color": "#c44e52",
947
+ "label": "country",
948
+ "value": "UK",
949
+ },
950
+ {
951
+ "color": undefined,
952
+ "label": "value",
953
+ "value": "35",
954
+ },
955
+ {
956
+ "label": "date",
957
+ "value": "2021",
958
+ },
959
+ ],
960
+ "title": "2021",
961
+ },
962
+ "x": 704.293,
963
+ "y": 127.94999999999999,
964
+ },
965
+ ],
966
+ "label": {
967
+ "connector": undefined,
968
+ "style": {
969
+ "dominantBaseline": "central",
970
+ "fill": "#c44e52",
971
+ "fontFamily": "system-ui, -apple-system, sans-serif",
972
+ "fontSize": 11,
973
+ "fontWeight": 600,
974
+ "lineHeight": 1.2,
975
+ "textAnchor": "start",
976
+ },
977
+ "text": "UK",
978
+ "visible": true,
979
+ "x": 710.293,
980
+ "y": 121.35,
981
+ },
982
+ "opacity": undefined,
983
+ "path": "M42.54,289.35L704.293,127.95",
984
+ "points": [
985
+ {
986
+ "x": 42.54,
987
+ "y": 289.35,
988
+ },
989
+ {
990
+ "x": 704.293,
991
+ "y": 127.94999999999999,
992
+ },
993
+ ],
994
+ "seriesKey": "UK",
995
+ "stroke": "#c44e52",
996
+ "strokeDasharray": undefined,
997
+ "strokeWidth": 2.5,
998
+ "type": "line",
999
+ },
1000
+ {
1001
+ "aria": {
1002
+ "label": "FR: line with 2 data points",
1003
+ },
1004
+ "data": [
1005
+ {
1006
+ "country": "FR",
1007
+ "date": "2020-01-01",
1008
+ "value": 8,
1009
+ },
1010
+ {
1011
+ "country": "FR",
1012
+ "date": "2021-01-01",
1013
+ "value": 22,
1014
+ },
1015
+ ],
1016
+ "dataPoints": [
1017
+ {
1018
+ "datum": {
1019
+ "country": "FR",
1020
+ "date": "2020-01-01",
1021
+ "value": 8,
1022
+ },
1023
+ "tooltip": {
1024
+ "fields": [
1025
+ {
1026
+ "color": "#6a9f58",
1027
+ "label": "country",
1028
+ "value": "FR",
1029
+ },
1030
+ {
1031
+ "color": undefined,
1032
+ "label": "value",
1033
+ "value": "8",
1034
+ },
1035
+ {
1036
+ "label": "date",
1037
+ "value": "2020",
1038
+ },
1039
+ ],
1040
+ "title": "2020",
1041
+ },
1042
+ "x": 42.54,
1043
+ "y": 345.84,
1044
+ },
1045
+ {
1046
+ "datum": {
1047
+ "country": "FR",
1048
+ "date": "2021-01-01",
1049
+ "value": 22,
1050
+ },
1051
+ "tooltip": {
1052
+ "fields": [
1053
+ {
1054
+ "color": "#6a9f58",
1055
+ "label": "country",
1056
+ "value": "FR",
1057
+ },
1058
+ {
1059
+ "color": undefined,
1060
+ "label": "value",
1061
+ "value": "22",
1062
+ },
1063
+ {
1064
+ "label": "date",
1065
+ "value": "2021",
1066
+ },
1067
+ ],
1068
+ "title": "2021",
1069
+ },
1070
+ "x": 704.293,
1071
+ "y": 232.85999999999999,
1072
+ },
1073
+ ],
1074
+ "label": {
1075
+ "connector": undefined,
1076
+ "style": {
1077
+ "dominantBaseline": "central",
1078
+ "fill": "#6a9f58",
1079
+ "fontFamily": "system-ui, -apple-system, sans-serif",
1080
+ "fontSize": 11,
1081
+ "fontWeight": 600,
1082
+ "lineHeight": 1.2,
1083
+ "textAnchor": "start",
1084
+ },
1085
+ "text": "FR",
1086
+ "visible": true,
1087
+ "x": 710.293,
1088
+ "y": 226.26,
1089
+ },
1090
+ "opacity": undefined,
1091
+ "path": "M42.54,345.84L704.293,232.86",
1092
+ "points": [
1093
+ {
1094
+ "x": 42.54,
1095
+ "y": 345.84,
1096
+ },
1097
+ {
1098
+ "x": 704.293,
1099
+ "y": 232.85999999999999,
1100
+ },
1101
+ ],
1102
+ "seriesKey": "FR",
1103
+ "stroke": "#6a9f58",
1104
+ "strokeDasharray": undefined,
1105
+ "strokeWidth": 2.5,
1106
+ "type": "line",
1107
+ },
1108
+ {
1109
+ "aria": {
1110
+ "label": "DE: line with 2 data points",
1111
+ },
1112
+ "data": [
1113
+ {
1114
+ "country": "DE",
1115
+ "date": "2020-01-01",
1116
+ "value": 12,
1117
+ },
1118
+ {
1119
+ "country": "DE",
1120
+ "date": "2021-01-01",
1121
+ "value": 28,
1122
+ },
1123
+ ],
1124
+ "dataPoints": [
1125
+ {
1126
+ "datum": {
1127
+ "country": "DE",
1128
+ "date": "2020-01-01",
1129
+ "value": 12,
1130
+ },
1131
+ "tooltip": {
1132
+ "fields": [
1133
+ {
1134
+ "color": "#d47215",
1135
+ "label": "country",
1136
+ "value": "DE",
1137
+ },
1138
+ {
1139
+ "color": undefined,
1140
+ "label": "value",
1141
+ "value": "12",
1142
+ },
1143
+ {
1144
+ "label": "date",
1145
+ "value": "2020",
1146
+ },
1147
+ ],
1148
+ "title": "2020",
1149
+ },
1150
+ "x": 42.54,
1151
+ "y": 313.55999999999995,
1152
+ },
1153
+ {
1154
+ "datum": {
1155
+ "country": "DE",
1156
+ "date": "2021-01-01",
1157
+ "value": 28,
1158
+ },
1159
+ "tooltip": {
1160
+ "fields": [
1161
+ {
1162
+ "color": "#d47215",
1163
+ "label": "country",
1164
+ "value": "DE",
1165
+ },
1166
+ {
1167
+ "color": undefined,
1168
+ "label": "value",
1169
+ "value": "28",
1170
+ },
1171
+ {
1172
+ "label": "date",
1173
+ "value": "2021",
1174
+ },
1175
+ ],
1176
+ "title": "2021",
1177
+ },
1178
+ "x": 704.293,
1179
+ "y": 184.44,
1180
+ },
1181
+ ],
1182
+ "label": {
1183
+ "connector": undefined,
1184
+ "style": {
1185
+ "dominantBaseline": "central",
1186
+ "fill": "#d47215",
1187
+ "fontFamily": "system-ui, -apple-system, sans-serif",
1188
+ "fontSize": 11,
1189
+ "fontWeight": 600,
1190
+ "lineHeight": 1.2,
1191
+ "textAnchor": "start",
1192
+ },
1193
+ "text": "DE",
1194
+ "visible": true,
1195
+ "x": 710.293,
1196
+ "y": 177.84,
1197
+ },
1198
+ "opacity": undefined,
1199
+ "path": "M42.54,313.56L704.293,184.44",
1200
+ "points": [
1201
+ {
1202
+ "x": 42.54,
1203
+ "y": 313.55999999999995,
1204
+ },
1205
+ {
1206
+ "x": 704.293,
1207
+ "y": 184.44,
1208
+ },
1209
+ ],
1210
+ "seriesKey": "DE",
1211
+ "stroke": "#d47215",
1212
+ "strokeDasharray": undefined,
1213
+ "strokeWidth": 2.5,
1214
+ "type": "line",
1215
+ },
1216
+ ],
1217
+ "theme": {
1218
+ "borderRadius": 4,
1219
+ "chrome": {
1220
+ "byline": {
1221
+ "color": "#999999",
1222
+ "fontSize": 12,
1223
+ "fontWeight": 400,
1224
+ "lineHeight": 1.3,
1225
+ },
1226
+ "footer": {
1227
+ "color": "#999999",
1228
+ "fontSize": 12,
1229
+ "fontWeight": 400,
1230
+ "lineHeight": 1.3,
1231
+ },
1232
+ "source": {
1233
+ "color": "#999999",
1234
+ "fontSize": 12,
1235
+ "fontWeight": 400,
1236
+ "lineHeight": 1.3,
1237
+ },
1238
+ "subtitle": {
1239
+ "color": "#666666",
1240
+ "fontSize": 15,
1241
+ "fontWeight": 400,
1242
+ "lineHeight": 1.4,
1243
+ },
1244
+ "title": {
1245
+ "color": "#333333",
1246
+ "fontSize": 22,
1247
+ "fontWeight": 700,
1248
+ "lineHeight": 1.3,
1249
+ },
1250
+ },
1251
+ "colors": {
1252
+ "annotationFill": "rgba(0,0,0,0.04)",
1253
+ "annotationText": "#555555",
1254
+ "axis": "#888888",
1255
+ "background": "#ffffff",
1256
+ "categorical": [
1257
+ "#1b7fa3",
1258
+ "#c44e52",
1259
+ "#6a9f58",
1260
+ "#d47215",
1261
+ "#507e79",
1262
+ "#9a6a8d",
1263
+ "#c4636b",
1264
+ "#9c755f",
1265
+ "#a88f22",
1266
+ "#858078",
1267
+ ],
1268
+ "diverging": {
1269
+ "brownTeal": [
1270
+ "#8c510a",
1271
+ "#bf812d",
1272
+ "#dfc27d",
1273
+ "#f6e8c3",
1274
+ "#80cdc1",
1275
+ "#35978f",
1276
+ "#01665e",
1277
+ ],
1278
+ "redBlue": [
1279
+ "#b2182b",
1280
+ "#d6604d",
1281
+ "#f4a582",
1282
+ "#f7f7f7",
1283
+ "#92c5de",
1284
+ "#4393c3",
1285
+ "#2166ac",
1286
+ ],
1287
+ },
1288
+ "gridline": "#e8e8e8",
1289
+ "sequential": {
1290
+ "blue": [
1291
+ "#deebf7",
1292
+ "#c6dbef",
1293
+ "#9ecae1",
1294
+ "#6baed6",
1295
+ "#3182bd",
1296
+ "#08519c",
1297
+ ],
1298
+ "green": [
1299
+ "#e5f5e0",
1300
+ "#c7e9c0",
1301
+ "#a1d99b",
1302
+ "#74c476",
1303
+ "#31a354",
1304
+ "#006d2c",
1305
+ ],
1306
+ "orange": [
1307
+ "#fee6ce",
1308
+ "#fdd0a2",
1309
+ "#fdae6b",
1310
+ "#fd8d3c",
1311
+ "#e6550d",
1312
+ "#a63603",
1313
+ ],
1314
+ "purple": [
1315
+ "#efedf5",
1316
+ "#dadaeb",
1317
+ "#bcbddc",
1318
+ "#9e9ac8",
1319
+ "#756bb1",
1320
+ "#54278f",
1321
+ ],
1322
+ },
1323
+ "text": "#1d1d1d",
1324
+ },
1325
+ "fonts": {
1326
+ "family": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1327
+ "mono": ""JetBrains Mono", "Fira Code", "Cascadia Code", monospace",
1328
+ "sizes": {
1329
+ "axisTick": 11,
1330
+ "body": 13,
1331
+ "small": 11,
1332
+ "subtitle": 15,
1333
+ "title": 22,
1334
+ },
1335
+ "weights": {
1336
+ "bold": 700,
1337
+ "medium": 500,
1338
+ "normal": 400,
1339
+ "semibold": 600,
1340
+ },
1341
+ },
1342
+ "isDark": false,
1343
+ "spacing": {
1344
+ "axisMargin": 6,
1345
+ "chartToFooter": 8,
1346
+ "chromeGap": 4,
1347
+ "chromeToChart": 8,
1348
+ "padding": 20,
1349
+ },
1350
+ },
1351
+ "tooltipDescriptors": [],
1352
+ "watermark": false,
1353
+ }
1354
+ `;
1355
+
1356
+ exports[`compileChart snapshot (Step 7 oracle) > watermarked column chart with gradient fill 1`] = `
1357
+ {
1358
+ "a11y": {
1359
+ "altText": "Bar chart showing Gradient Columns across 4 categories (4 data points)",
1360
+ "dataTableFallback": [
1361
+ [
1362
+ "category",
1363
+ "score",
1364
+ ],
1365
+ [
1366
+ "A",
1367
+ 30,
1368
+ ],
1369
+ [
1370
+ "B",
1371
+ 55,
1372
+ ],
1373
+ [
1374
+ "C",
1375
+ 70,
1376
+ ],
1377
+ [
1378
+ "D",
1379
+ 45,
1380
+ ],
1381
+ ],
1382
+ "keyboardNavigable": true,
1383
+ "role": "img",
1384
+ },
1385
+ "animation": undefined,
1386
+ "annotations": [],
1387
+ "area": {
1388
+ "height": 237.2,
1389
+ "width": 535.46,
1390
+ "x": 41.54,
1391
+ "y": 59.6,
1392
+ },
1393
+ "axes": {
1394
+ "x": {
1395
+ "domainLine": undefined,
1396
+ "end": {
1397
+ "x": 577,
1398
+ "y": 296.8,
1399
+ },
1400
+ "gridlines": [],
1401
+ "label": undefined,
1402
+ "labelFlush": undefined,
1403
+ "labelOverlap": undefined,
1404
+ "labelPadding": undefined,
1405
+ "labelStyle": {
1406
+ "fill": "#1d1d1d",
1407
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1408
+ "fontSize": 13,
1409
+ "fontWeight": 500,
1410
+ "lineHeight": 1.3,
1411
+ },
1412
+ "offset": undefined,
1413
+ "orient": undefined,
1414
+ "start": {
1415
+ "x": 41.54,
1416
+ "y": 296.8,
1417
+ },
1418
+ "tickAngle": undefined,
1419
+ "tickLabelStyle": {
1420
+ "fill": "#888888",
1421
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1422
+ "fontSize": 11,
1423
+ "fontVariant": "tabular-nums",
1424
+ "fontWeight": 400,
1425
+ "lineHeight": 1.2,
1426
+ },
1427
+ "tickMarks": undefined,
1428
+ "ticks": [
1429
+ {
1430
+ "label": "A",
1431
+ "position": 124.62862068965518,
1432
+ "value": "A",
1433
+ },
1434
+ {
1435
+ "label": "B",
1436
+ "position": 247.7228735632184,
1437
+ "value": "B",
1438
+ },
1439
+ {
1440
+ "label": "C",
1441
+ "position": 370.8171264367816,
1442
+ "value": "C",
1443
+ },
1444
+ {
1445
+ "label": "D",
1446
+ "position": 493.9113793103449,
1447
+ "value": "D",
1448
+ },
1449
+ ],
1450
+ "titlePadding": undefined,
1451
+ },
1452
+ "y": {
1453
+ "domainLine": undefined,
1454
+ "end": {
1455
+ "x": 41.54,
1456
+ "y": 296.8,
1457
+ },
1458
+ "gridlines": [
1459
+ {
1460
+ "major": true,
1461
+ "position": 296.8,
1462
+ },
1463
+ {
1464
+ "major": true,
1465
+ "position": 229.02857142857144,
1466
+ },
1467
+ {
1468
+ "major": true,
1469
+ "position": 161.25714285714287,
1470
+ },
1471
+ {
1472
+ "major": true,
1473
+ "position": 93.4857142857143,
1474
+ },
1475
+ ],
1476
+ "label": undefined,
1477
+ "labelFlush": undefined,
1478
+ "labelOverlap": undefined,
1479
+ "labelPadding": undefined,
1480
+ "labelStyle": {
1481
+ "fill": "#1d1d1d",
1482
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1483
+ "fontSize": 13,
1484
+ "fontWeight": 500,
1485
+ "lineHeight": 1.3,
1486
+ },
1487
+ "offset": undefined,
1488
+ "orient": undefined,
1489
+ "start": {
1490
+ "x": 41.54,
1491
+ "y": 59.6,
1492
+ },
1493
+ "tickAngle": undefined,
1494
+ "tickLabelStyle": {
1495
+ "fill": "#888888",
1496
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1497
+ "fontSize": 11,
1498
+ "fontVariant": "tabular-nums",
1499
+ "fontWeight": 400,
1500
+ "lineHeight": 1.2,
1501
+ },
1502
+ "tickMarks": undefined,
1503
+ "ticks": [
1504
+ {
1505
+ "label": "0",
1506
+ "position": 296.8,
1507
+ "value": 0,
1508
+ },
1509
+ {
1510
+ "label": "20",
1511
+ "position": 229.02857142857144,
1512
+ "value": 20,
1513
+ },
1514
+ {
1515
+ "label": "40",
1516
+ "position": 161.25714285714287,
1517
+ "value": 40,
1518
+ },
1519
+ {
1520
+ "label": "60",
1521
+ "position": 93.4857142857143,
1522
+ "value": 60,
1523
+ },
1524
+ ],
1525
+ "titlePadding": undefined,
1526
+ },
1527
+ },
1528
+ "chrome": {
1529
+ "bottomHeight": 60.2,
1530
+ "byline": {
1531
+ "maxWidth": 431,
1532
+ "style": {
1533
+ "dominantBaseline": "hanging",
1534
+ "fill": "#999999",
1535
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1536
+ "fontSize": 12,
1537
+ "fontWeight": 400,
1538
+ "lineHeight": 1.3,
1539
+ "textAnchor": "start",
1540
+ },
1541
+ "text": "By the engine",
1542
+ "x": 17,
1543
+ "y": 27.6,
1544
+ },
1545
+ "source": {
1546
+ "maxWidth": 431,
1547
+ "style": {
1548
+ "dominantBaseline": "hanging",
1549
+ "fill": "#999999",
1550
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1551
+ "fontSize": 12,
1552
+ "fontWeight": 400,
1553
+ "lineHeight": 1.3,
1554
+ "textAnchor": "start",
1555
+ },
1556
+ "text": "Test data",
1557
+ "x": 17,
1558
+ "y": 8,
1559
+ },
1560
+ "title": {
1561
+ "maxWidth": 561,
1562
+ "style": {
1563
+ "dominantBaseline": "hanging",
1564
+ "fill": "#333333",
1565
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1566
+ "fontSize": 22,
1567
+ "fontWeight": 700,
1568
+ "lineHeight": 1.3,
1569
+ "textAnchor": "start",
1570
+ },
1571
+ "text": "Gradient Columns",
1572
+ "x": 17,
1573
+ "y": 17,
1574
+ },
1575
+ "topHeight": 36.6,
1576
+ },
1577
+ "dimensions": {
1578
+ "height": 400,
1579
+ "width": 600,
1580
+ },
1581
+ "legend": {
1582
+ "bounds": {
1583
+ "height": 0,
1584
+ "width": 0,
1585
+ "x": 0,
1586
+ "y": 0,
1587
+ },
1588
+ "entries": [],
1589
+ "entryGap": 16,
1590
+ "labelStyle": {
1591
+ "fill": "#1d1d1d",
1592
+ "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1593
+ "fontSize": 11,
1594
+ "fontWeight": 400,
1595
+ "lineHeight": 1.3,
1596
+ },
1597
+ "position": "top",
1598
+ "swatchGap": 6,
1599
+ "swatchSize": 12,
1600
+ },
1601
+ "marks": [
1602
+ {
1603
+ "aria": {
1604
+ "label": "A: 30",
1605
+ },
1606
+ "cornerRadius": 2,
1607
+ "data": {
1608
+ "category": "A",
1609
+ "score": 30,
1610
+ },
1611
+ "fill": {
1612
+ "stops": [
1613
+ {
1614
+ "color": "#ff0000",
1615
+ "offset": 0,
1616
+ },
1617
+ {
1618
+ "color": "#0000ff",
1619
+ "offset": 1,
1620
+ },
1621
+ ],
1622
+ "type": "linear",
1623
+ },
1624
+ "height": 101.65714285714287,
1625
+ "label": {
1626
+ "connector": undefined,
1627
+ "style": {
1628
+ "dominantBaseline": "auto",
1629
+ "fill": "#0000ff",
1630
+ "fontFamily": "system-ui, -apple-system, sans-serif",
1631
+ "fontSize": 10,
1632
+ "fontWeight": 600,
1633
+ "lineHeight": 1.2,
1634
+ "textAnchor": "middle",
1635
+ },
1636
+ "text": "30",
1637
+ "visible": true,
1638
+ "x": 124.62862068965518,
1639
+ "y": 177.14285714285714,
1640
+ },
1641
+ "orient": "vertical",
1642
+ "type": "rect",
1643
+ "width": 80.01126436781611,
1644
+ "x": 84.62298850574712,
1645
+ "y": 195.14285714285714,
1646
+ },
1647
+ {
1648
+ "aria": {
1649
+ "label": "B: 55",
1650
+ },
1651
+ "cornerRadius": 2,
1652
+ "data": {
1653
+ "category": "B",
1654
+ "score": 55,
1655
+ },
1656
+ "fill": {
1657
+ "stops": [
1658
+ {
1659
+ "color": "#ff0000",
1660
+ "offset": 0,
1661
+ },
1662
+ {
1663
+ "color": "#0000ff",
1664
+ "offset": 1,
1665
+ },
1666
+ ],
1667
+ "type": "linear",
1668
+ },
1669
+ "height": 186.37142857142857,
1670
+ "label": {
1671
+ "connector": undefined,
1672
+ "style": {
1673
+ "dominantBaseline": "auto",
1674
+ "fill": "#0000ff",
1675
+ "fontFamily": "system-ui, -apple-system, sans-serif",
1676
+ "fontSize": 10,
1677
+ "fontWeight": 600,
1678
+ "lineHeight": 1.2,
1679
+ "textAnchor": "middle",
1680
+ },
1681
+ "text": "55",
1682
+ "visible": true,
1683
+ "x": 247.7228735632184,
1684
+ "y": 92.42857142857144,
1685
+ },
1686
+ "orient": "vertical",
1687
+ "type": "rect",
1688
+ "width": 80.01126436781611,
1689
+ "x": 207.71724137931034,
1690
+ "y": 110.42857142857144,
1691
+ },
1692
+ {
1693
+ "aria": {
1694
+ "label": "C: 70",
1695
+ },
1696
+ "cornerRadius": 2,
1697
+ "data": {
1698
+ "category": "C",
1699
+ "score": 70,
1700
+ },
1701
+ "fill": {
1702
+ "stops": [
1703
+ {
1704
+ "color": "#ff0000",
1705
+ "offset": 0,
1706
+ },
1707
+ {
1708
+ "color": "#0000ff",
1709
+ "offset": 1,
1710
+ },
1711
+ ],
1712
+ "type": "linear",
1713
+ },
1714
+ "height": 237.20000000000002,
1715
+ "label": {
1716
+ "connector": undefined,
1717
+ "style": {
1718
+ "dominantBaseline": "auto",
1719
+ "fill": "#0000ff",
1720
+ "fontFamily": "system-ui, -apple-system, sans-serif",
1721
+ "fontSize": 10,
1722
+ "fontWeight": 600,
1723
+ "lineHeight": 1.2,
1724
+ "textAnchor": "middle",
1725
+ },
1726
+ "text": "70",
1727
+ "visible": true,
1728
+ "x": 370.8171264367816,
1729
+ "y": 41.6,
1730
+ },
1731
+ "orient": "vertical",
1732
+ "type": "rect",
1733
+ "width": 80.01126436781611,
1734
+ "x": 330.81149425287356,
1735
+ "y": 59.6,
1736
+ },
1737
+ {
1738
+ "aria": {
1739
+ "label": "D: 45",
1740
+ },
1741
+ "cornerRadius": 2,
1742
+ "data": {
1743
+ "category": "D",
1744
+ "score": 45,
1745
+ },
1746
+ "fill": {
1747
+ "stops": [
1748
+ {
1749
+ "color": "#ff0000",
1750
+ "offset": 0,
1751
+ },
1752
+ {
1753
+ "color": "#0000ff",
1754
+ "offset": 1,
1755
+ },
1756
+ ],
1757
+ "type": "linear",
1758
+ },
1759
+ "height": 152.48571428571432,
1760
+ "label": {
1761
+ "connector": undefined,
1762
+ "style": {
1763
+ "dominantBaseline": "auto",
1764
+ "fill": "#0000ff",
1765
+ "fontFamily": "system-ui, -apple-system, sans-serif",
1766
+ "fontSize": 10,
1767
+ "fontWeight": 600,
1768
+ "lineHeight": 1.2,
1769
+ "textAnchor": "middle",
1770
+ },
1771
+ "text": "45",
1772
+ "visible": true,
1773
+ "x": 493.9113793103449,
1774
+ "y": 126.31428571428569,
1775
+ },
1776
+ "orient": "vertical",
1777
+ "type": "rect",
1778
+ "width": 80.01126436781611,
1779
+ "x": 453.90574712643684,
1780
+ "y": 144.3142857142857,
1781
+ },
1782
+ ],
1783
+ "theme": {
1784
+ "borderRadius": 4,
1785
+ "chrome": {
1786
+ "byline": {
1787
+ "color": "#999999",
1788
+ "fontSize": 12,
1789
+ "fontWeight": 400,
1790
+ "lineHeight": 1.3,
1791
+ },
1792
+ "footer": {
1793
+ "color": "#999999",
1794
+ "fontSize": 12,
1795
+ "fontWeight": 400,
1796
+ "lineHeight": 1.3,
1797
+ },
1798
+ "source": {
1799
+ "color": "#999999",
1800
+ "fontSize": 12,
1801
+ "fontWeight": 400,
1802
+ "lineHeight": 1.3,
1803
+ },
1804
+ "subtitle": {
1805
+ "color": "#666666",
1806
+ "fontSize": 15,
1807
+ "fontWeight": 400,
1808
+ "lineHeight": 1.4,
1809
+ },
1810
+ "title": {
1811
+ "color": "#333333",
1812
+ "fontSize": 22,
1813
+ "fontWeight": 700,
1814
+ "lineHeight": 1.3,
1815
+ },
1816
+ },
1817
+ "colors": {
1818
+ "annotationFill": "rgba(0,0,0,0.04)",
1819
+ "annotationText": "#555555",
1820
+ "axis": "#888888",
1821
+ "background": "#ffffff",
1822
+ "categorical": [
1823
+ "#1b7fa3",
1824
+ "#c44e52",
1825
+ "#6a9f58",
1826
+ "#d47215",
1827
+ "#507e79",
1828
+ "#9a6a8d",
1829
+ "#c4636b",
1830
+ "#9c755f",
1831
+ "#a88f22",
1832
+ "#858078",
1833
+ ],
1834
+ "diverging": {
1835
+ "brownTeal": [
1836
+ "#8c510a",
1837
+ "#bf812d",
1838
+ "#dfc27d",
1839
+ "#f6e8c3",
1840
+ "#80cdc1",
1841
+ "#35978f",
1842
+ "#01665e",
1843
+ ],
1844
+ "redBlue": [
1845
+ "#b2182b",
1846
+ "#d6604d",
1847
+ "#f4a582",
1848
+ "#f7f7f7",
1849
+ "#92c5de",
1850
+ "#4393c3",
1851
+ "#2166ac",
1852
+ ],
1853
+ },
1854
+ "gridline": "#e8e8e8",
1855
+ "sequential": {
1856
+ "blue": [
1857
+ "#deebf7",
1858
+ "#c6dbef",
1859
+ "#9ecae1",
1860
+ "#6baed6",
1861
+ "#3182bd",
1862
+ "#08519c",
1863
+ ],
1864
+ "green": [
1865
+ "#e5f5e0",
1866
+ "#c7e9c0",
1867
+ "#a1d99b",
1868
+ "#74c476",
1869
+ "#31a354",
1870
+ "#006d2c",
1871
+ ],
1872
+ "orange": [
1873
+ "#fee6ce",
1874
+ "#fdd0a2",
1875
+ "#fdae6b",
1876
+ "#fd8d3c",
1877
+ "#e6550d",
1878
+ "#a63603",
1879
+ ],
1880
+ "purple": [
1881
+ "#efedf5",
1882
+ "#dadaeb",
1883
+ "#bcbddc",
1884
+ "#9e9ac8",
1885
+ "#756bb1",
1886
+ "#54278f",
1887
+ ],
1888
+ },
1889
+ "text": "#1d1d1d",
1890
+ },
1891
+ "fonts": {
1892
+ "family": "Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif",
1893
+ "mono": ""JetBrains Mono", "Fira Code", "Cascadia Code", monospace",
1894
+ "sizes": {
1895
+ "axisTick": 11,
1896
+ "body": 13,
1897
+ "small": 11,
1898
+ "subtitle": 15,
1899
+ "title": 22,
1900
+ },
1901
+ "weights": {
1902
+ "bold": 700,
1903
+ "medium": 500,
1904
+ "normal": 400,
1905
+ "semibold": 600,
1906
+ },
1907
+ },
1908
+ "isDark": false,
1909
+ "spacing": {
1910
+ "axisMargin": 6,
1911
+ "chartToFooter": 8,
1912
+ "chromeGap": 4,
1913
+ "chromeToChart": 8,
1914
+ "padding": 20,
1915
+ },
1916
+ },
1917
+ "tooltipDescriptors": [
1918
+ [
1919
+ "rect-0",
1920
+ {
1921
+ "fields": [
1922
+ {
1923
+ "color": "#0000ff",
1924
+ "label": "score",
1925
+ "value": "30",
1926
+ },
1927
+ {
1928
+ "label": "category",
1929
+ "value": "A",
1930
+ },
1931
+ ],
1932
+ "title": "A",
1933
+ },
1934
+ ],
1935
+ [
1936
+ "rect-1",
1937
+ {
1938
+ "fields": [
1939
+ {
1940
+ "color": "#0000ff",
1941
+ "label": "score",
1942
+ "value": "55",
1943
+ },
1944
+ {
1945
+ "label": "category",
1946
+ "value": "B",
1947
+ },
1948
+ ],
1949
+ "title": "B",
1950
+ },
1951
+ ],
1952
+ [
1953
+ "rect-2",
1954
+ {
1955
+ "fields": [
1956
+ {
1957
+ "color": "#0000ff",
1958
+ "label": "score",
1959
+ "value": "70",
1960
+ },
1961
+ {
1962
+ "label": "category",
1963
+ "value": "C",
1964
+ },
1965
+ ],
1966
+ "title": "C",
1967
+ },
1968
+ ],
1969
+ [
1970
+ "rect-3",
1971
+ {
1972
+ "fields": [
1973
+ {
1974
+ "color": "#0000ff",
1975
+ "label": "score",
1976
+ "value": "45",
1977
+ },
1978
+ {
1979
+ "label": "category",
1980
+ "value": "D",
1981
+ },
1982
+ ],
1983
+ "title": "D",
1984
+ },
1985
+ ],
1986
+ ],
1987
+ "watermark": true,
1988
+ }
1989
+ `;