File size: 23,851 Bytes
f3042bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# Gosling 1.0.7 submission contract

Author one complete Gosling 1.0.7 specification for the task. The host renders it in a fixed 900 × 620 CSS-pixel viewport with hg38 assembly metadata supplied by the host.

Submit a complete JavaScript program with the `code` tool. The program returns the complete specification as plain object literals; it does not print it or return a patch. The TypeScript declarations in the appendix are reference only: write plain JavaScript, with no type annotations. Imports, files, and network access are disabled.

Bind the task rows by name with `data: { type: "json", name: "table", chromosomeField: "<field>", genomicFields: ["<field>", ...] }`, naming the rows' chromosome and genomic position fields. The host replaces each such reference with exactly the rows shown in the task before validation. Do not copy the rows into the specification: inline data is rejected. Tracks may filter or reuse the same rows.

The program may also read the same rows, for example to compute domains:

```typescript
declare function getData(): Promise<Array<Record<string, unknown>>>;
```

The host accepts a submission only after JSON-Schema validation, native compilation, and a render without console, page, or network errors all succeed. A rejected call returns its stage and error. Repair it by submitting another complete program.

Each attempt is retained for evaluation. The latest submission, not the last accepted one, controls the final outcome: a later invalid submission makes the final outcome invalid even when an earlier accepted chart is retained for audit. Stop after acceptance.

---

# Complete native schema type documentation

Generated mechanically from the complete accepted JSON Schema with the same plain-mode TypeScript renderer used by the Vega-Lite full-documentation control. These declarations are reference only. The generic Vega-Lite worked example is deliberately excluded.

```typescript
type Aggregate = "max" | "min" | "mean" | "bin" | "count";

type Assembly = string | unknown[][];

type AxisPosition = "none" | "top" | "bottom" | "left" | "right";

interface BamData {
  extractJunction?: boolean;
  indexUrl: string;
  junctionMinCoverage?: number;
  loadMates?: boolean;
  maxInsertSize?: number;
  type: string;
  url: string;
}

interface BigWigData {
  aggregation?: string;
  binSize?: number;
  column?: string;
  end?: string;
  start?: string;
  type: string;
  url: string;
  value?: string;
}

type BinAggregate = "mean" | "sum";

type ChannelDeep = Record<string, unknown>;

interface X {
  aggregate?: string;
  axis?: string;
  domain?: Record<string, unknown>;
  field?: string;
  grid?: boolean;
  legend?: boolean;
  linkingId?: string;
  range?: unknown[];
  type?: string;
}

type GenomicDomain = Record<string, unknown>;

interface DomainInterval {
  interval: unknown[];
}

interface DomainChrInterval {
  chromosome: string;
  interval: unknown[];
}

interface DomainChr {
  chromosome: string;
}

type ValueExtent = string[] | number[];

interface Y {
  aggregate?: string;
  axis?: string;
  baseline?: string | number;
  domain?: ValueExtent | GenomicDomain;
  field?: string;
  flip?: boolean;
  grid?: boolean;
  legend?: boolean;
  linkingId?: string;
  range?: unknown[];
  type?: "quantitative" | "nominal" | "genomic";
  zeroBaseline?: boolean;
}

interface Row {
  clip?: boolean;
  domain?: unknown[];
  field?: string;
  grid?: boolean;
  legend?: boolean;
  padding?: number;
  range?: unknown[];
  type?: string;
}

interface Color {
  domain?: unknown[];
  field?: string;
  legend?: boolean;
  range?: Range;
  scale?: "linear" | "log";
  scaleOffset?: unknown[];
  title?: string;
  type?: "quantitative" | "nominal";
}

type Range = unknown[] | "viridis" | "grey" | "spectral" | "warm" | "cividis" | "bupu" | "rdbu" | "hot" | "pink";

interface Size {
  domain?: unknown[];
  field?: string;
  legend?: boolean;
  range?: unknown[];
  type?: "quantitative" | "nominal";
}

interface Stroke {
  domain?: unknown[];
  field?: string;
  legend?: boolean;
  range?: Range;
  scaleOffset?: unknown[];
  title?: string;
  type?: "quantitative" | "nominal";
}

interface StrokeWidth {
  domain?: unknown[];
  field?: string;
  range?: unknown[];
  type?: "quantitative" | "nominal";
}

interface Opacity {
  domain?: unknown[];
  field?: string;
  range?: unknown[];
  type?: "quantitative" | "nominal";
}

interface Text {
  domain?: unknown[];
  field?: string;
  range?: unknown[];
  type?: "quantitative" | "nominal";
}

type ChannelValue = number | string;

interface CsvData {
  chromosomeField?: string;
  chromosomePrefix?: string;
  genomicFields?: unknown[];
  genomicFieldsToConvert?: { chromosomeField: string; genomicFields: unknown[] }[];
  headerNames?: unknown[];
  longToWideId?: string;
  sampleLength?: number;
  separator?: string;
  type: string;
  url: string;
}

type DataDeep = { chromosomeField?: string; genomicFields?: unknown[]; genomicFieldsToConvert?: Record<string, unknown>[]; sampleLength?: number; type: string; values: Record<string, unknown>[] } | Record<string, unknown> | { customFields?: unknown[]; indexUrl: string; sampleLength?: number; type: string; url: string } | { exonIntervalFields?: unknown[]; genomicFields: Record<string, unknown>[]; type: string; url: string; valueFields?: Record<string, unknown>[] } | { indexUrl: string; sampleLength?: number; type: string; url: string } | { attributesToFields?: Record<string, unknown>[]; indexUrl: string; sampleLength?: number; type: string; url: string } | { type: string; name: string; chromosomeField: string; genomicFields: unknown[]; genomicFieldsToConvert?: Record<string, unknown>[]; sampleLength?: number };

interface MultivecData {
  aggregation?: string;
  binSize?: number;
  categories?: unknown[];
  column?: string;
  end?: string;
  row?: string;
  start?: string;
  type: string;
  url: string;
  value?: string;
}

interface VectorData {
  aggregation?: string;
  binSize?: number;
  column?: string;
  end?: string;
  start?: string;
  type: string;
  url: string;
  value?: string;
}

interface MatrixData {
  binSize?: number;
  column?: string;
  row?: string;
  type: string;
  url: string;
  value?: string;
}

type DataTransform = { field: string; not?: boolean; oneOf: unknown[]; type: string } | { field: string; inRange: unknown[]; not?: boolean; type: string } | { field: string; include: string; not?: boolean; type: string } | { fields: unknown[]; newField: string; separator: string; type: string } | { field: string; newField: string; replace: Record<string, unknown>[]; type: string } | { base?: number | string; field: string; newField?: string; type: string } | { boundingBox: { endField: string; groupField?: string; isPaddingBP?: boolean; padding?: number; startField: string }; maxRows?: number; method: string; newField: string; type: string } | { fields: Record<string, unknown>[]; flag: { field: string; value: number | string }; separator: string; type: string } | { endField: string; newField: string; startField: string; type: string } | { firstBp: { chrField: string; posField: string; strandField: string }; newField: string; secondBp: { chrField: string; posField: string; strandField: string }; type: string } | { endField: string; groupField?: string; newField?: string; startField: string; type: string } | { baseGenomicField: string; field: string; genomicField: string; genomicLengthField: string; type: string };

type DisplacementType = "pile" | "spread";

type FieldType = "genomic" | "nominal" | "quantitative";

interface Displacement {
  padding?: number;
  type: string;
}

interface DummyTrack {
  _invalidTrack?: boolean;
  assembly?: string;
  height?: number;
  id?: string;
  layout?: string;
  orientation?: string;
  overlayOnPreviousTrack?: boolean;
  static?: boolean;
  style?: Record<string, unknown>;
  title?: string;
  type: string;
  width?: number;
  zoomLimits?: unknown[];
}

type Orientation = "horizontal" | "vertical";

interface DummyTrackStyle {
  background?: string;
  outline?: string;
  textFontSize?: number;
  textFontWeight?: "bold" | "normal";
  textStroke?: string;
  textStrokeWidth?: number;
}

interface EventStyle {
  arrange?: "behind" | "front";
  color?: string;
  opacity?: number;
  stroke?: string;
  strokeOpacity?: number;
  strokeWidth?: number;
}

type Layout = "linear" | "circular";

type LogicalOperation = "less-than" | "lt" | "LT" | "greater-than" | "gt" | "GT" | "less-than-or-equal-to" | "ltet" | "LTET" | "greater-than-or-equal-to" | "gtet" | "GTET";

type Mark = "point" | "line" | "area" | "bar" | "rect" | "text" | "withinLink" | "betweenLink" | "rule" | "triangleLeft" | "triangleRight" | "triangleBottom" | ...;

interface MouseEventsDeep {
  click?: boolean;
  enableMouseOverOnMultipleMarks?: boolean;
  groupMarksByField?: string;
  mouseOver?: boolean;
  rangeSelect?: boolean;
}

interface Style {
  align?: "left" | "right";
  background?: string;
  backgroundOpacity?: number;
  brush?: { color?: string; opacity?: number; stroke?: string; strokeOpacity?: number; strokeWidth?: number };
  curve?: "top" | "bottom" | "left" | "right";
  dashed?: unknown[];
  dx?: number;
  dy?: number;
  enableSmoothPath?: boolean;
  inlineLegend?: boolean;
  legendTitle?: string;
  linePattern?: { size: number; type: "triangleLeft" | "triangleRight" };
  linkConnectionType?: "straight" | "curve" | "corner";
  linkMinHeight?: number;
  linkStyle?: "elliptical" | "circular" | "straight";
  matrixExtent?: "full" | "upper-right" | "lower-left";
  mouseOver?: Record<string, unknown>;
  outline?: string;
  outlineWidth?: number;
  select?: Record<string, unknown>;
  textAnchor?: "start" | "middle" | "end";
  textFontSize?: number;
  textFontWeight?: "bold" | "normal";
  textStroke?: string;
  textStrokeWidth?: number;
  withinLinkVerticalLines?: boolean;
}

interface ZoomLimits {
  items: unknown[];
}

interface OverlaidTrack {
  _assignedHeight?: number;
  _assignedWidth?: number;
  _invalidTrack?: boolean;
  _overlay: OverlaidTrackOverlayItem[];
  _renderingId?: string;
  assembly?: Assembly;
  baselineY?: number;
  centerRadius?: number;
  color?: Color | ChannelValue;
  data?: Record<string, unknown>;
  dataTransform?: DataTransform[];
  displacement?: Record<string, unknown>;
  endAngle?: number;
  experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
  flipY?: boolean;
  height?: number;
  id?: string;
  innerRadius?: number;
  layout?: string;
  linkingId?: string;
  mark?: string;
  mouseEvents?: boolean | MouseEventsDeep;
  opacity?: Opacity | ChannelValue;
  orientation?: string;
  outerRadius?: number;
  overlayOnPreviousTrack?: boolean;
  prerelease?: {  };
  row?: Row | ChannelValue;
  size?: Size | ChannelValue;
  spacing?: number;
  startAngle?: number;
  static?: boolean;
  stretch?: boolean;
  stroke?: Stroke | ChannelValue;
  strokeWidth?: StrokeWidth | ChannelValue;
  style?: Record<string, unknown>;
  subtitle?: string;
  text?: Text | ChannelValue;
  title?: string;
  tooltip?: Tooltip[];
  visibility?: VisibilityCondition[];
  width?: number;
  x?: X | ChannelValue;
  x1?: X | ChannelValue;
  x1e?: X | ChannelValue;
  xAxis?: string;
  xDomain?: DomainInterval | DomainChrInterval | DomainChr;
  xOffset?: number;
  xe?: X | ChannelValue;
  y?: Y | ChannelValue;
  y1?: Y | ChannelValue;
  y1e?: Y | ChannelValue;
  yDomain?: DomainInterval | DomainChrInterval | DomainChr;
  yOffset?: number;
  ye?: Y | ChannelValue;
  zoomLimits?: unknown[];
}

interface OverlaidTrackOverlayItem {
  _assignedHeight?: number;
  _assignedWidth?: number;
  _invalidTrack?: boolean;
  _renderingId?: string;
  assembly?: Assembly;
  baselineY?: number;
  centerRadius?: number;
  color?: Color | ChannelValue;
  data?: Record<string, unknown>;
  dataTransform?: DataTransform[];
  displacement?: Record<string, unknown>;
  endAngle?: number;
  experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
  flipY?: boolean;
  id?: string;
  innerRadius?: number;
  linkingId?: string;
  mark?: string;
  mouseEvents?: boolean | MouseEventsDeep;
  opacity?: Opacity | ChannelValue;
  orientation?: string;
  outerRadius?: number;
  overlayOnPreviousTrack?: boolean;
  prerelease?: {  };
  row?: Row | ChannelValue;
  size?: Size | ChannelValue;
  spacing?: number;
  startAngle?: number;
  static?: boolean;
  stretch?: boolean;
  stroke?: Stroke | ChannelValue;
  strokeWidth?: StrokeWidth | ChannelValue;
  style?: Record<string, unknown>;
  text?: Text | ChannelValue;
  tooltip?: Tooltip[];
  visibility?: VisibilityCondition[];
  x?: X | ChannelValue;
  x1?: X | ChannelValue;
  x1e?: X | ChannelValue;
  xAxis?: string;
  xDomain?: DomainInterval | DomainChrInterval | DomainChr;
  xOffset?: number;
  xe?: X | ChannelValue;
  y?: Y | ChannelValue;
  y1?: Y | ChannelValue;
  y1e?: Y | ChannelValue;
  yDomain?: DomainInterval | DomainChrInterval | DomainChr;
  yOffset?: number;
  ye?: Y | ChannelValue;
  zoomLimits?: unknown[];
}

interface Tooltip {
  alt?: string;
  field: string;
  format?: string;
  type: string;
}

type VisibilityCondition = { conditionPadding?: number; measure: "width" | "height"; operation: string; target: "track" | "mark"; threshold: number | string; transitionPadding?: number } | Record<string, unknown>;

interface ZoomLevelVisibilityCondition {
  conditionPadding?: number;
  measure: string;
  operation: string;
  target: "track" | "mark";
  threshold: number;
  transitionPadding?: number;
}

interface PartialTrack {
  _assignedHeight?: number;
  _assignedWidth?: number;
  _invalidTrack?: boolean;
  _overlay?: PartialTrackOverlayItem[];
  _renderingId?: string;
  assembly?: Assembly | string;
  baselineY?: number;
  centerRadius?: number;
  color?: Color | ChannelValue;
  data?: Record<string, unknown>;
  dataTransform?: DataTransform[];
  displacement?: Record<string, unknown>;
  encoding?: Record<string, ChannelDeep | ChannelValue>;
  endAngle?: number;
  experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
  flipY?: boolean;
  height?: number;
  id?: string;
  innerRadius?: number;
  layout?: Layout | string;
  linkingId?: string;
  mark?: string;
  mouseEvents?: boolean | MouseEventsDeep;
  opacity?: Opacity | ChannelValue;
  orientation?: string;
  outerRadius?: number;
  overlayOnPreviousTrack?: boolean;
  prerelease?: {  };
  row?: Row | ChannelValue;
  size?: Size | ChannelValue;
  spacing?: number;
  startAngle?: number;
  static?: boolean;
  stretch?: boolean;
  stroke?: Stroke | ChannelValue;
  strokeWidth?: StrokeWidth | ChannelValue;
  style?: Style | DummyTrackStyle;
  subtitle?: string;
  template?: string;
  text?: Text | ChannelValue;
  title?: string;
  tooltip?: Tooltip[];
  type?: string;
  visibility?: VisibilityCondition[];
  width?: number;
  x?: X | ChannelValue;
  x1?: X | ChannelValue;
  x1e?: X | ChannelValue;
  xAxis?: string;
  xDomain?: DomainInterval | DomainChrInterval | DomainChr;
  xOffset?: number;
  xe?: X | ChannelValue;
  y?: Y | ChannelValue;
  y1?: Y | ChannelValue;
  y1e?: Y | ChannelValue;
  yDomain?: DomainInterval | DomainChrInterval | DomainChr;
  yOffset?: number;
  ye?: Y | ChannelValue;
  zoomLimits?: ZoomLimits | null[];
}

interface PartialTrackOverlayItem {
  _assignedHeight?: number;
  _assignedWidth?: number;
  _invalidTrack?: boolean;
  _renderingId?: string;
  assembly?: Assembly;
  baselineY?: number;
  centerRadius?: number;
  color?: Color | ChannelValue;
  data?: Record<string, unknown>;
  dataTransform?: DataTransform[];
  displacement?: Record<string, unknown>;
  endAngle?: number;
  experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
  flipY?: boolean;
  id?: string;
  innerRadius?: number;
  linkingId?: string;
  mark?: string;
  mouseEvents?: boolean | MouseEventsDeep;
  opacity?: Opacity | ChannelValue;
  orientation?: string;
  outerRadius?: number;
  overlayOnPreviousTrack?: boolean;
  prerelease?: {  };
  row?: Row | ChannelValue;
  size?: Size | ChannelValue;
  spacing?: number;
  startAngle?: number;
  static?: boolean;
  stretch?: boolean;
  stroke?: Stroke | ChannelValue;
  strokeWidth?: StrokeWidth | ChannelValue;
  style?: Record<string, unknown>;
  text?: Text | ChannelValue;
  tooltip?: Tooltip[];
  visibility?: VisibilityCondition[];
  x?: X | ChannelValue;
  x1?: X | ChannelValue;
  x1e?: X | ChannelValue;
  xAxis?: string;
  xDomain?: DomainInterval | DomainChrInterval | DomainChr;
  xOffset?: number;
  xe?: X | ChannelValue;
  y?: Y | ChannelValue;
  y1?: Y | ChannelValue;
  y1e?: Y | ChannelValue;
  yDomain?: DomainInterval | DomainChrInterval | DomainChr;
  yOffset?: number;
  ye?: Y | ChannelValue;
  zoomLimits?: unknown[];
}

interface SingleTrack {
  _assignedHeight?: number;
  _assignedWidth?: number;
  _invalidTrack?: boolean;
  _renderingId?: string;
  assembly?: Assembly;
  baselineY?: number;
  centerRadius?: number;
  color?: Color | ChannelValue;
  data: Record<string, unknown>;
  dataTransform?: DataTransform[];
  displacement?: Record<string, unknown>;
  endAngle?: number;
  experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
  flipY?: boolean;
  height?: number;
  id?: string;
  innerRadius?: number;
  layout?: string;
  linkingId?: string;
  mark: string;
  mouseEvents?: boolean | MouseEventsDeep;
  opacity?: Opacity | ChannelValue;
  orientation?: string;
  outerRadius?: number;
  overlayOnPreviousTrack?: boolean;
  prerelease?: {  };
  row?: Row | ChannelValue;
  size?: Size | ChannelValue;
  spacing?: number;
  startAngle?: number;
  static?: boolean;
  stretch?: boolean;
  stroke?: Stroke | ChannelValue;
  strokeWidth?: StrokeWidth | ChannelValue;
  style?: Record<string, unknown>;
  subtitle?: string;
  text?: Text | ChannelValue;
  title?: string;
  tooltip?: Tooltip[];
  visibility?: VisibilityCondition[];
  width?: number;
  x?: X | ChannelValue;
  x1?: X | ChannelValue;
  x1e?: X | ChannelValue;
  xAxis?: string;
  xDomain?: DomainInterval | DomainChrInterval | DomainChr;
  xOffset?: number;
  xe?: X | ChannelValue;
  y?: Y | ChannelValue;
  y1?: Y | ChannelValue;
  y1e?: Y | ChannelValue;
  yDomain?: DomainInterval | DomainChrInterval | DomainChr;
  yOffset?: number;
  ye?: Y | ChannelValue;
  zoomLimits?: unknown[];
}

interface TemplateTrack {
  _assignedHeight?: number;
  _assignedWidth?: number;
  _invalidTrack?: boolean;
  _renderingId?: string;
  assembly?: Assembly;
  centerRadius?: number;
  data: Record<string, unknown>;
  encoding?: Record<string, ChannelDeep | ChannelValue>;
  endAngle?: number;
  height?: number;
  id?: string;
  innerRadius?: number;
  layout?: string;
  linkingId?: string;
  orientation?: string;
  outerRadius?: number;
  overlayOnPreviousTrack?: boolean;
  prerelease?: {  };
  spacing?: number;
  startAngle?: number;
  static?: boolean;
  style?: Record<string, unknown>;
  subtitle?: string;
  template: string;
  title?: string;
  width?: number;
  xAxis?: string;
  xDomain?: DomainInterval | DomainChrInterval | DomainChr;
  xOffset?: number;
  yDomain?: DomainInterval | DomainChrInterval | DomainChr;
  yOffset?: number;
  zoomLimits?: unknown[];
}

type Spec = { _assignedHeight?: number; _assignedWidth?: number; _invalidTrack?: boolean; _renderingId?: string; alignment: string; assembly?: Assembly; baselineY?: number; centerRadius?: number; color?: Color | ChannelValue; data?: DataDeep; dataTransform?: DataTransform[]; description?: string; displacement?: Displacement; endAngle?: number; experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number }; flipY?: boolean; height?: number; id?: string; innerRadius?: number; layout?: Layout; linkingId?: string; mark?: Mark; mouseEvents?: boolean | MouseEventsDeep; opacity?: Opacity | ChannelValue; orientation?: Orientation; outerRadius?: number; overlayOnPreviousTrack?: boolean; prerelease?: Record<string, unknown>; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; row?: Row | ChannelValue; size?: Size | ChannelValue; spacing?: number; startAngle?: number; static?: boolean; stretch?: boolean; stroke?: Stroke | ChannelValue; strokeWidth?: StrokeWidth | ChannelValue; style?: Style; subtitle?: string; text?: Text | ChannelValue; title?: string; tooltip?: Tooltip[]; tracks: PartialTrack[]; visibility?: VisibilityCondition[]; width?: number; x?: X | ChannelValue; x1?: X | ChannelValue; x1e?: X | ChannelValue; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; xe?: X | ChannelValue; y?: Y | ChannelValue; y1?: Y | ChannelValue; y1e?: Y | ChannelValue; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; ye?: Y | ChannelValue; zoomLimits?: ZoomLimits } | { _assignedHeight?: number; _assignedWidth?: number; _invalidTrack?: boolean; _renderingId?: string; alignment?: string; assembly?: Assembly; baselineY?: number; centerRadius?: number; color?: Color | ChannelValue; data?: DataDeep; dataTransform?: DataTransform[]; description?: string; displacement?: Displacement; endAngle?: number; experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number }; flipY?: boolean; height?: number; id?: string; innerRadius?: number; layout?: Layout; linkingId?: string; mark?: Mark; mouseEvents?: boolean | MouseEventsDeep; opacity?: Opacity | ChannelValue; orientation?: Orientation; outerRadius?: number; overlayOnPreviousTrack?: boolean; prerelease?: Record<string, unknown>; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; row?: Row | ChannelValue; size?: Size | ChannelValue; spacing?: number; startAngle?: number; static?: boolean; stretch?: boolean; stroke?: Stroke | ChannelValue; strokeWidth?: StrokeWidth | ChannelValue; style?: Style; subtitle?: string; text?: Text | ChannelValue; title?: string; tooltip?: Tooltip[]; tracks: unknown[]; visibility?: VisibilityCondition[]; width?: number; x?: X | ChannelValue; x1?: X | ChannelValue; x1e?: X | ChannelValue; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; xe?: X | ChannelValue; y?: Y | ChannelValue; y1?: Y | ChannelValue; y1e?: Y | ChannelValue; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; ye?: Y | ChannelValue; zoomLimits?: ZoomLimits } | { _assignedHeight?: number; _assignedWidth?: number; assembly?: Assembly; centerRadius?: number; description?: string; id?: string; layout?: Layout; linkingId?: string; orientation?: Orientation; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; spacing?: number; static?: boolean; style?: Style; subtitle?: string; title?: string; tracks: unknown[]; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; zoomLimits?: ZoomLimits } | { _assignedHeight?: number; _assignedWidth?: number; arrangement?: "parallel" | "serial" | "horizontal" | "vertical"; assembly?: Assembly; centerRadius?: number; description?: string; id?: string; layout?: Layout; linkingId?: string; orientation?: Orientation; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; spacing?: number; static?: boolean; style?: Style; subtitle?: string; title?: string; views: unknown[]; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; zoomLimits?: ZoomLimits };

```