@opendata-ai/openchart-core 8.9.1 → 9.0.0-rc.2
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.
- package/README.md +3 -2
- package/dist/index.d.ts +704 -348
- package/dist/index.js +353 -247
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/schema/chart.schema.json +1475 -5266
- package/schema/table.schema.json +64 -89
- package/schema/vizspec.schema.json +2040 -9798
package/dist/index.d.ts
CHANGED
|
@@ -142,15 +142,17 @@ interface DesignDiagnostic {
|
|
|
142
142
|
origin: 'author' | 'default';
|
|
143
143
|
fix?: SpecPatch;
|
|
144
144
|
}
|
|
145
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Atomic edits guarded by the complete source document. `changes` uses the same
|
|
147
|
+
* `EditOp` semantics as `applyEditTransaction`: `set` replaces a value whose
|
|
148
|
+
* parent exists, `add` also creates missing object containers, and `remove`
|
|
149
|
+
* deletes a value.
|
|
150
|
+
*/
|
|
146
151
|
interface SpecPatch {
|
|
147
152
|
label: string;
|
|
148
153
|
/** Canonical source snapshot prevents stale fixes overwriting subsequent edits. */
|
|
149
154
|
precondition: string;
|
|
150
|
-
changes:
|
|
151
|
-
path: string;
|
|
152
|
-
value: unknown;
|
|
153
|
-
}>;
|
|
155
|
+
changes: EditOp[];
|
|
154
156
|
}
|
|
155
157
|
type DesignQuestion = 'comparison' | 'change' | 'distribution' | 'composition' | 'geography' | 'relationships';
|
|
156
158
|
interface CompositionRecommendation {
|
|
@@ -186,6 +188,44 @@ interface DatasetBinding {
|
|
|
186
188
|
groupMembers?: Record<string, Array<string | number>>;
|
|
187
189
|
}
|
|
188
190
|
|
|
191
|
+
interface GeoColorKeyLayout {
|
|
192
|
+
kind: 'binned' | 'gradient' | 'categorical';
|
|
193
|
+
field: string;
|
|
194
|
+
format?: string;
|
|
195
|
+
activeValue: boolean;
|
|
196
|
+
distribution: boolean;
|
|
197
|
+
/** Exact existing classes. Counts are finite joined observations, never area. */
|
|
198
|
+
classes: Array<{
|
|
199
|
+
index: number;
|
|
200
|
+
color: string;
|
|
201
|
+
lower?: number;
|
|
202
|
+
upper?: number;
|
|
203
|
+
count: number;
|
|
204
|
+
x: number;
|
|
205
|
+
width: number;
|
|
206
|
+
y?: number;
|
|
207
|
+
height?: number;
|
|
208
|
+
}>;
|
|
209
|
+
categories: Array<{
|
|
210
|
+
value: string;
|
|
211
|
+
color: string;
|
|
212
|
+
count: number;
|
|
213
|
+
bounds: Rect;
|
|
214
|
+
}>;
|
|
215
|
+
missing: number;
|
|
216
|
+
bar?: Rect;
|
|
217
|
+
domain?: [number, number];
|
|
218
|
+
clampDomain?: [number, number];
|
|
219
|
+
/** Measured exact-value lines keyed by tagged raw value; A prefix is replaced by the slot. */
|
|
220
|
+
activeLabels?: Record<string, string[]>;
|
|
221
|
+
activeRows: Rect[];
|
|
222
|
+
distributionBounds?: Rect;
|
|
223
|
+
}
|
|
224
|
+
interface GeoColorKeyDescriptor {
|
|
225
|
+
features?: GeoColorKeyLayout;
|
|
226
|
+
points?: GeoColorKeyLayout;
|
|
227
|
+
}
|
|
228
|
+
|
|
189
229
|
/**
|
|
190
230
|
* Derived neutral ramp.
|
|
191
231
|
*
|
|
@@ -237,13 +277,6 @@ interface NeutralRamp {
|
|
|
237
277
|
*/
|
|
238
278
|
declare function deriveNeutralRamp(text: string, bg: string, isDark?: boolean): NeutralRamp;
|
|
239
279
|
|
|
240
|
-
/**
|
|
241
|
-
* Theme types: color palettes, typography, spacing, and chrome defaults.
|
|
242
|
-
*
|
|
243
|
-
* ThemeConfig is the user-facing partial config (all optional).
|
|
244
|
-
* ResolvedTheme is the public fully resolved output type.
|
|
245
|
-
*/
|
|
246
|
-
|
|
247
280
|
/**
|
|
248
281
|
* A color token value: either a plain CSS color string, or a light/dark pair.
|
|
249
282
|
* When a pair is given, the resolver picks the appropriate value based on
|
|
@@ -292,6 +325,8 @@ interface ThemeColors {
|
|
|
292
325
|
text: string;
|
|
293
326
|
/** Gridline color. */
|
|
294
327
|
gridline: string;
|
|
328
|
+
/** Zero-rule ink. Defaults to stronger contrast than ordinary gridlines. */
|
|
329
|
+
gridlineZero?: string;
|
|
295
330
|
/** Axis line and tick color. */
|
|
296
331
|
axis: string;
|
|
297
332
|
/** Annotation fill color. */
|
|
@@ -312,6 +347,14 @@ interface ThemeColors {
|
|
|
312
347
|
annotationMarkerFill: string;
|
|
313
348
|
/** Annotation plate color. */
|
|
314
349
|
annotationPlate: string;
|
|
350
|
+
/** Missing-data map surface; omission derives from the current neutral ramp. */
|
|
351
|
+
mapNoDataFill?: string;
|
|
352
|
+
/** Missing-data map hatch ink; omission derives from the current neutral ramp. */
|
|
353
|
+
mapNoDataHatch?: string;
|
|
354
|
+
/** Interior geographic borders; omission uses the current mode-specific rule. */
|
|
355
|
+
mapInteriorBorder?: string;
|
|
356
|
+
/** Geographic outline ink; omission uses the current mode-specific rule. */
|
|
357
|
+
mapOutlineBorder?: string;
|
|
315
358
|
/** Semantic color for positive/up-trend values (e.g. sparkline trend coloring). */
|
|
316
359
|
positive: string;
|
|
317
360
|
/** Semantic color for negative/down-trend values (e.g. sparkline trend coloring). */
|
|
@@ -337,6 +380,10 @@ interface ThemeFontSizes {
|
|
|
337
380
|
small: number;
|
|
338
381
|
/** Axis tick label font size in pixels. */
|
|
339
382
|
axisTick: number;
|
|
383
|
+
/** Series-name text in endpoint columns and interior area labels. */
|
|
384
|
+
endpointLabel: number;
|
|
385
|
+
/** Numerical endpoint value text. */
|
|
386
|
+
endpointValue: number;
|
|
340
387
|
/** KPI metric uppercase label font size in pixels. */
|
|
341
388
|
metricLabel: number;
|
|
342
389
|
/** KPI metric primary value font size in pixels. The delta and secondary
|
|
@@ -369,6 +416,12 @@ interface ThemeFonts {
|
|
|
369
416
|
interface ThemeSpacing {
|
|
370
417
|
/** Padding inside the visualization container (all sides). */
|
|
371
418
|
padding: number;
|
|
419
|
+
/** Minimum separation between resolved endpoint label blocks. */
|
|
420
|
+
endpointEntryGap: number;
|
|
421
|
+
/** Gap between the endpoint name and its numerical value. */
|
|
422
|
+
endpointValueGap: number;
|
|
423
|
+
/** Gap between plot bounds and the endpoint column. */
|
|
424
|
+
endpointColumnGap: number;
|
|
372
425
|
/** Gap between chrome elements (title to subtitle, subtitle to chart, etc.). */
|
|
373
426
|
chromeGap: number;
|
|
374
427
|
/** Gap between the last chrome element and the chart area. */
|
|
@@ -443,14 +496,14 @@ interface ThemeBase {
|
|
|
443
496
|
/** Series color assignment strategy. Default: 'palette' (full categorical). */
|
|
444
497
|
seriesStrategy: SeriesStrategy;
|
|
445
498
|
}
|
|
446
|
-
/** @deprecated Use ThemeConfig for input or ResolvedTheme for resolved output. */
|
|
447
|
-
type Theme = ThemeBase;
|
|
448
499
|
/** Fully resolved runtime theme, including color adaptation and token metadata. */
|
|
449
500
|
interface ResolvedTheme extends ThemeBase {
|
|
450
501
|
/** Colors plus the neutral ramp derived from `text` and `background`. */
|
|
451
502
|
colors: ResolvedThemeColors;
|
|
452
503
|
/** Whether dark mode adaptations have been applied to this theme. */
|
|
453
504
|
isDark: boolean;
|
|
505
|
+
/** Authored theme leaves, retained for CSS overrides and mode adaptation. @internal */
|
|
506
|
+
_authored?: ThemeConfig;
|
|
454
507
|
/**
|
|
455
508
|
* Original light/dark token pairs from the user's ThemeConfig. Used
|
|
456
509
|
* by adaptTheme() to skip algorithmic adaptation for tokens with
|
|
@@ -560,6 +613,10 @@ interface ResolvedChrome {
|
|
|
560
613
|
byline?: ResolvedChromeElement;
|
|
561
614
|
footer?: ResolvedChromeElement;
|
|
562
615
|
brand?: ResolvedChromeElement;
|
|
616
|
+
/** Measured default attribution mark; renderers use its exact size and position. */
|
|
617
|
+
watermark?: ResolvedChromeElement;
|
|
618
|
+
/** Resolved footer composition; independent of temporary interaction state. */
|
|
619
|
+
attributionLayout?: 'inline' | 'stacked';
|
|
563
620
|
/** Annotation footnotes generated by auto-thinning. Rendered as a numbered list above the source line. */
|
|
564
621
|
footnotes?: AnnotationFootnote[];
|
|
565
622
|
/** Reserved annotation-note and series-summary band, independent of the current demoted set. */
|
|
@@ -603,6 +660,8 @@ interface AxisTick {
|
|
|
603
660
|
}
|
|
604
661
|
/** A single gridline with computed positions. */
|
|
605
662
|
interface Gridline {
|
|
663
|
+
/** Optional resolved semantic stroke, such as an authored zero guide. */
|
|
664
|
+
color?: string;
|
|
606
665
|
/** Pixel position along the axis. */
|
|
607
666
|
position: number;
|
|
608
667
|
/** Whether this is a major or minor gridline. */
|
|
@@ -656,7 +715,10 @@ interface AxisLayout {
|
|
|
656
715
|
x: number;
|
|
657
716
|
y: number;
|
|
658
717
|
angle?: number;
|
|
718
|
+
textAnchor?: 'start' | 'middle' | 'end';
|
|
659
719
|
};
|
|
720
|
+
/** Engine-wrapped title lines, used by a measured header band. */
|
|
721
|
+
titleLines?: string[];
|
|
660
722
|
}
|
|
661
723
|
/** The four built-in fill pattern shapes for series reinforcement. */
|
|
662
724
|
type FillPatternType = 'diagonal' | 'dot' | 'crosshatch' | 'vertical';
|
|
@@ -785,6 +847,12 @@ interface AreaMark {
|
|
|
785
847
|
y: number;
|
|
786
848
|
datum: Record<string, unknown>;
|
|
787
849
|
tooltip?: TooltipContent;
|
|
850
|
+
/** False for synthetic pivot rows; geometry does not imply an observed zero. */
|
|
851
|
+
observed?: boolean;
|
|
852
|
+
/** Lower band boundary in pixels; y remains the upper boundary for interactions. */
|
|
853
|
+
yBottom?: number;
|
|
854
|
+
/** Contiguous area segment identity, split by explicit missing observations. */
|
|
855
|
+
segment?: number;
|
|
788
856
|
}>;
|
|
789
857
|
/** Accessibility attributes. */
|
|
790
858
|
aria: MarkAria;
|
|
@@ -1101,6 +1169,11 @@ interface ResolvedLabel {
|
|
|
1101
1169
|
dx: number;
|
|
1102
1170
|
dy: number;
|
|
1103
1171
|
};
|
|
1172
|
+
/**
|
|
1173
|
+
* The target's own value label. The data end stops short of it instead of
|
|
1174
|
+
* striking through it; retained so geometry rebuilds stop at the same label.
|
|
1175
|
+
*/
|
|
1176
|
+
targetLabel?: Rect;
|
|
1104
1177
|
/** Fixed label attachment for outside-reference gutter leaders; retained during animation. */
|
|
1105
1178
|
labelAttachment?: 'left-center';
|
|
1106
1179
|
/** Connector line color. */
|
|
@@ -1196,6 +1269,13 @@ interface ResolvedAnnotation {
|
|
|
1196
1269
|
}
|
|
1197
1270
|
/** A footnote entry generated by annotation auto-thinning. */
|
|
1198
1271
|
interface AnnotationFootnote {
|
|
1272
|
+
/** Original subtitle, kept separate from the primary text. */
|
|
1273
|
+
subtitle?: string;
|
|
1274
|
+
/** Parsed display runs, one array per wrapped line, including the ordinal. */
|
|
1275
|
+
spans?: Array<Array<{
|
|
1276
|
+
text: string;
|
|
1277
|
+
bold: boolean;
|
|
1278
|
+
}>>;
|
|
1199
1279
|
/** Engine-wrapped display lines, including the number; omitted for one-line notes. */
|
|
1200
1280
|
lines?: string[];
|
|
1201
1281
|
/** Source annotation index, independent of note numbering. */
|
|
@@ -1215,6 +1295,8 @@ interface LegendEntry {
|
|
|
1215
1295
|
color: string;
|
|
1216
1296
|
/** Shape of the swatch (matches the mark type). */
|
|
1217
1297
|
shape: 'circle' | 'square' | 'line';
|
|
1298
|
+
/** SVG dash pattern for a `line` swatch, matching a strokeDash-encoded series. */
|
|
1299
|
+
strokeDasharray?: string;
|
|
1218
1300
|
/** Whether this entry is currently highlighted/active. */
|
|
1219
1301
|
active?: boolean;
|
|
1220
1302
|
/** True for overflow indicator entries ("+N more"). Not interactive. */
|
|
@@ -1242,6 +1324,15 @@ interface BaseLegendLayout {
|
|
|
1242
1324
|
position: 'top' | 'top-left' | 'right' | 'bottom' | 'bottom-right' | 'inline';
|
|
1243
1325
|
/** Bounding box for the legend (pixel coordinates). */
|
|
1244
1326
|
bounds: Rect;
|
|
1327
|
+
/** Measured static key text in figure coordinates; absent on traditional chart keys. */
|
|
1328
|
+
textRows?: Array<{
|
|
1329
|
+
text: string;
|
|
1330
|
+
x: number;
|
|
1331
|
+
y: number;
|
|
1332
|
+
style: TextStyle;
|
|
1333
|
+
role: 'title' | 'unit' | 'context' | 'midpoint';
|
|
1334
|
+
anchor?: 'start' | 'middle' | 'end';
|
|
1335
|
+
}>;
|
|
1245
1336
|
/** Entry label style. */
|
|
1246
1337
|
labelStyle: TextStyle;
|
|
1247
1338
|
}
|
|
@@ -1342,6 +1433,11 @@ interface ContinuousLegendLayout extends BaseLegendLayout {
|
|
|
1342
1433
|
mode: 'gradient' | 'binned';
|
|
1343
1434
|
/** The color bar rectangle (pixel coordinates). */
|
|
1344
1435
|
bar: Rect;
|
|
1436
|
+
/** Optional measured vertical class rows for geographic side keys. */
|
|
1437
|
+
rangeEntries?: Array<{
|
|
1438
|
+
index: number;
|
|
1439
|
+
bounds: Rect;
|
|
1440
|
+
}>;
|
|
1345
1441
|
/** Gradient color stops (empty in binned mode). */
|
|
1346
1442
|
colorStops: GradientColorStop[];
|
|
1347
1443
|
/** Class swatches, left to right (empty in gradient mode). */
|
|
@@ -1438,6 +1534,16 @@ interface SizeLegendLayout extends BaseLegendLayout {
|
|
|
1438
1534
|
type LegendLayout = CategoricalLegendLayout | GradientLegendLayout | ContinuousLegendLayout | SizeLegendLayout;
|
|
1439
1535
|
/** A single resolved endpoint-label entry, fully positioned. */
|
|
1440
1536
|
interface EndpointLabelEntry {
|
|
1537
|
+
/** Actual observation x in pixels; leaders must not imply a shared final date. */
|
|
1538
|
+
dataX?: number;
|
|
1539
|
+
/** Source observation retained without parsing display text. */
|
|
1540
|
+
source?: {
|
|
1541
|
+
datum: Record<string, unknown>;
|
|
1542
|
+
x: unknown;
|
|
1543
|
+
observed: true;
|
|
1544
|
+
};
|
|
1545
|
+
/** Resolved date qualification for unequal series endpoints. */
|
|
1546
|
+
date?: string;
|
|
1441
1547
|
/** Series identifier (matches mark.seriesKey). */
|
|
1442
1548
|
seriesKey: string;
|
|
1443
1549
|
/** Pre-wrapped label text lines. */
|
|
@@ -1446,6 +1552,8 @@ interface EndpointLabelEntry {
|
|
|
1446
1552
|
value: string;
|
|
1447
1553
|
/** Series color. */
|
|
1448
1554
|
color: string;
|
|
1555
|
+
/** SVG dash pattern of the series line, drawn on the swatch. */
|
|
1556
|
+
strokeDasharray?: string;
|
|
1449
1557
|
/** True pixel y of the last data point on the line. */
|
|
1450
1558
|
dataY: number;
|
|
1451
1559
|
/** Displaced y after the bidirectional collision sweep. */
|
|
@@ -1467,6 +1575,16 @@ interface EndpointLabelEntry {
|
|
|
1467
1575
|
}
|
|
1468
1576
|
/** Resolved layout for the endpoint labels column. */
|
|
1469
1577
|
interface EndpointLabelsLayout {
|
|
1578
|
+
/** Fit-tested, series-name-only labels in stacked bands. */
|
|
1579
|
+
interior?: Array<{
|
|
1580
|
+
seriesKey: string;
|
|
1581
|
+
text: string;
|
|
1582
|
+
x: number;
|
|
1583
|
+
y: number;
|
|
1584
|
+
color: string;
|
|
1585
|
+
width: number;
|
|
1586
|
+
height: number;
|
|
1587
|
+
}>;
|
|
1470
1588
|
/** Per-series resolved entries. */
|
|
1471
1589
|
entries: EndpointLabelEntry[];
|
|
1472
1590
|
/** Bounding box for the column. */
|
|
@@ -1506,7 +1624,14 @@ interface TooltipField {
|
|
|
1506
1624
|
*/
|
|
1507
1625
|
emphasis?: boolean;
|
|
1508
1626
|
/** Semantic role. `'total'` is the stack sum row, rendered below a hairline. */
|
|
1509
|
-
role?: 'total';
|
|
1627
|
+
role?: 'x' | 'series' | 'value' | 'total';
|
|
1628
|
+
source?: {
|
|
1629
|
+
field: string;
|
|
1630
|
+
channel: string;
|
|
1631
|
+
tooltipIndex?: number;
|
|
1632
|
+
layer?: string;
|
|
1633
|
+
panel?: string;
|
|
1634
|
+
};
|
|
1510
1635
|
}
|
|
1511
1636
|
/** Tooltip content descriptor for a data point. */
|
|
1512
1637
|
interface TooltipContent {
|
|
@@ -1657,7 +1782,7 @@ interface ScaleInvert {
|
|
|
1657
1782
|
topData: number;
|
|
1658
1783
|
bottomData: number;
|
|
1659
1784
|
/** Scale type so the vanilla layer applies the correct inverse transform. */
|
|
1660
|
-
scaleType?: 'linear' | 'log' | 'pow' | 'sqrt' | 'symlog' | 'time';
|
|
1785
|
+
scaleType?: 'linear' | 'log' | 'pow' | 'sqrt' | 'symlog' | 'time' | 'utc';
|
|
1661
1786
|
/** For band/point scales: ordered domain values and their pixel centers. */
|
|
1662
1787
|
domain?: (string | number)[];
|
|
1663
1788
|
positions?: number[];
|
|
@@ -1975,6 +2100,10 @@ interface TableTotalRow {
|
|
|
1975
2100
|
* pagination, sort, search state, and accessibility metadata.
|
|
1976
2101
|
*/
|
|
1977
2102
|
interface TableLayout {
|
|
2103
|
+
/** Width used to resolve the portable attribution footer. */
|
|
2104
|
+
width?: number;
|
|
2105
|
+
/** Same measurement used for footer wrapping in the compiler. */
|
|
2106
|
+
measureText?: MeasureTextFn;
|
|
1978
2107
|
/** Resolved chrome text elements. */
|
|
1979
2108
|
chrome: ResolvedChrome;
|
|
1980
2109
|
/** Resolved column definitions. */
|
|
@@ -1999,11 +2128,6 @@ interface TableLayout {
|
|
|
1999
2128
|
striped: boolean;
|
|
2000
2129
|
/** Totals footer, present only when `totalRow` is enabled. */
|
|
2001
2130
|
totalRow?: TableTotalRow;
|
|
2002
|
-
/**
|
|
2003
|
-
* Whether condensed density is active.
|
|
2004
|
-
* @deprecated Read `density === 'condensed'` instead.
|
|
2005
|
-
*/
|
|
2006
|
-
compact: boolean;
|
|
2007
2131
|
/** Accessibility metadata. */
|
|
2008
2132
|
a11y: {
|
|
2009
2133
|
caption: string;
|
|
@@ -2382,6 +2506,12 @@ interface GeoMapBorders {
|
|
|
2382
2506
|
* accessibility metadata.
|
|
2383
2507
|
*/
|
|
2384
2508
|
interface GeoMapLayout {
|
|
2509
|
+
/** Optional independent geographic viewports; absent on the legacy fast path. */
|
|
2510
|
+
views?: GeoViewLayout[];
|
|
2511
|
+
/** Optional map-only color key presentation; omitted when disabled. */
|
|
2512
|
+
colorKeys?: GeoColorKeyDescriptor;
|
|
2513
|
+
/** Omitted entirely unless geographic labels or callouts are authored. */
|
|
2514
|
+
labels?: GeoLabelsBundle;
|
|
2385
2515
|
/** The map drawing area (after chrome and legend are subtracted). */
|
|
2386
2516
|
area: Rect;
|
|
2387
2517
|
/** Resolved chrome text elements with positions and styles. */
|
|
@@ -2398,7 +2528,8 @@ interface GeoMapLayout {
|
|
|
2398
2528
|
pointContinuousLegend: ContinuousLegendLayout | null;
|
|
2399
2529
|
/**
|
|
2400
2530
|
* Nested-circle size key for the point layer's `size` channel (null when the
|
|
2401
|
-
* layer has no size encoding).
|
|
2531
|
+
* layer has no size encoding). Placed in a measured map corner that avoids
|
|
2532
|
+
* occupied feature/point bounds; bottom-right wins clear or tied candidates.
|
|
2402
2533
|
*/
|
|
2403
2534
|
pointSizeLegend: SizeLegendLayout | null;
|
|
2404
2535
|
/** Continuous color legend for quantitative mode (null if hidden or categorical). */
|
|
@@ -2526,7 +2657,9 @@ interface CompileOptions {
|
|
|
2526
2657
|
* How chrome height interacts with the height budget. Mirrors the spec-level
|
|
2527
2658
|
* `chromeLayout`; the engine reads whichever is set (spec wins).
|
|
2528
2659
|
*
|
|
2529
|
-
* -
|
|
2660
|
+
* - omitted: notes and the series summary grow the SVG; title, subtitle, and
|
|
2661
|
+
* source subtract from `height`.
|
|
2662
|
+
* - `'subtract'`: `height` is the fixed total; all chrome shrinks the plot.
|
|
2530
2663
|
* - `'grow'`: `height` is the plot budget; the SVG grows by the chrome height.
|
|
2531
2664
|
*/
|
|
2532
2665
|
chromeLayout?: 'subtract' | 'grow';
|
|
@@ -2586,34 +2719,6 @@ interface CompileOptions {
|
|
|
2586
2719
|
* If not provided, the engine falls back to heuristic estimation.
|
|
2587
2720
|
*/
|
|
2588
2721
|
measureText?: MeasureTextFn;
|
|
2589
|
-
/** Extra pixels to reserve on the right margin for a secondary y-axis. Set by compileLayer when resolve.scale.y is 'independent'. */
|
|
2590
|
-
rightAxisReserve?: number;
|
|
2591
|
-
/**
|
|
2592
|
-
* Internal note-band reserve resolved from source annotation capacity and
|
|
2593
|
-
* responsive series-summary lines. Subtract mode consumes the fixed figure
|
|
2594
|
-
* budget; grow mode adds the reserve to the SVG height while keeping the
|
|
2595
|
-
* original layout budget and padding. Callers should not set this field.
|
|
2596
|
-
*/
|
|
2597
|
-
footnoteReserve?: number;
|
|
2598
|
-
/** Recursion depth of the footnote-reserve convergence pass. Internal to compileChart. */
|
|
2599
|
-
footnotePass?: number;
|
|
2600
|
-
/** Set after facet height growth to prevent unbounded recursion. Internal to compileFaceted. */
|
|
2601
|
-
facetHeightGrown?: boolean;
|
|
2602
|
-
/**
|
|
2603
|
-
* Use this chart drawing area instead of computing one from chrome, axes,
|
|
2604
|
-
* and legend reservations. Set by compileLayer when compiling leaf layers so
|
|
2605
|
-
* their marks land in the primary layout's coordinate space; leaf specs lack
|
|
2606
|
-
* the layer-level chrome/legend/theme and would otherwise compute a
|
|
2607
|
-
* different area than the one the axes are rendered in.
|
|
2608
|
-
*/
|
|
2609
|
-
frozenChartArea?: Rect;
|
|
2610
|
-
/**
|
|
2611
|
-
* Marks this compile as one leaf (or the primary spec) of a multi-leaf layer.
|
|
2612
|
-
* Set by compileLayer; callers should not set it. Only consumer today is the
|
|
2613
|
-
* canvas mark-layer resolution, which refuses canvas mode for layered charts
|
|
2614
|
-
* because the layer layout concatenates marks from several compiles.
|
|
2615
|
-
*/
|
|
2616
|
-
layered?: boolean;
|
|
2617
2722
|
}
|
|
2618
2723
|
/** Extended compile options for table visualizations. */
|
|
2619
2724
|
interface CompileTableOptions extends CompileOptions {
|
|
@@ -2631,6 +2736,186 @@ interface CompileTableOptions extends CompileOptions {
|
|
|
2631
2736
|
pageSize?: number;
|
|
2632
2737
|
}
|
|
2633
2738
|
|
|
2739
|
+
/** Portable, measured map-label payload. All coordinates are map-local CSS pixels. */
|
|
2740
|
+
|
|
2741
|
+
interface GeoTextBlock {
|
|
2742
|
+
width: number;
|
|
2743
|
+
height: number;
|
|
2744
|
+
/** Baselines relative to the block's top-left corner. */
|
|
2745
|
+
lines: Array<{
|
|
2746
|
+
text: string;
|
|
2747
|
+
x: number;
|
|
2748
|
+
y: number;
|
|
2749
|
+
style: TextStyle;
|
|
2750
|
+
}>;
|
|
2751
|
+
}
|
|
2752
|
+
interface GeoLabelComponent {
|
|
2753
|
+
index: number;
|
|
2754
|
+
exterior: Point[];
|
|
2755
|
+
holes: Point[][];
|
|
2756
|
+
/** Original SVG nonzero-fill orientation, preserved through normalized storage. */
|
|
2757
|
+
winding?: number;
|
|
2758
|
+
holeWindings?: number[];
|
|
2759
|
+
}
|
|
2760
|
+
interface GeoLabelGeometry {
|
|
2761
|
+
featureId: string;
|
|
2762
|
+
bounds: Rect;
|
|
2763
|
+
canonicalAnchor?: Point;
|
|
2764
|
+
components?: GeoLabelComponent[];
|
|
2765
|
+
vertexCount: number;
|
|
2766
|
+
mode: 'retained' | 'fallback' | 'unresolved';
|
|
2767
|
+
searchLimited?: boolean;
|
|
2768
|
+
captureLimited?: boolean;
|
|
2769
|
+
}
|
|
2770
|
+
interface GeoLabelCandidate {
|
|
2771
|
+
/** Stable tagged identity, distinct from authored callout and entity IDs. */
|
|
2772
|
+
id: string;
|
|
2773
|
+
kind: 'text' | 'callout';
|
|
2774
|
+
anchor: GeoAnchor;
|
|
2775
|
+
text: string;
|
|
2776
|
+
subtitle?: string;
|
|
2777
|
+
priority: number;
|
|
2778
|
+
block: GeoTextBlock;
|
|
2779
|
+
/** Projected point/coordinate anchor; feature anchors use geometryId. */
|
|
2780
|
+
resolvedAnchor?: Point;
|
|
2781
|
+
/** Constant-screen radius of an anchored quantitative symbol. */
|
|
2782
|
+
anchorRadius?: number;
|
|
2783
|
+
geometryId?: string;
|
|
2784
|
+
minZoom?: number;
|
|
2785
|
+
maxZoom?: number;
|
|
2786
|
+
offset?: {
|
|
2787
|
+
dx: number;
|
|
2788
|
+
dy: number;
|
|
2789
|
+
};
|
|
2790
|
+
/** Stable index into the premeasured authored callout note slots. */
|
|
2791
|
+
noteSlot?: number;
|
|
2792
|
+
}
|
|
2793
|
+
interface GeoCalloutNoteSlot {
|
|
2794
|
+
id: string;
|
|
2795
|
+
number: number;
|
|
2796
|
+
bounds: Rect;
|
|
2797
|
+
block: GeoTextBlock;
|
|
2798
|
+
}
|
|
2799
|
+
type GeoLabelVisibility = 'visible' | 'collision' | 'zoom-range' | 'offscreen' | 'unresolved' | 'geometry-budget';
|
|
2800
|
+
interface GeoLabelInventoryEntry {
|
|
2801
|
+
id: string;
|
|
2802
|
+
kind: 'text' | 'callout';
|
|
2803
|
+
anchor: GeoAnchor;
|
|
2804
|
+
text: string;
|
|
2805
|
+
subtitle?: string;
|
|
2806
|
+
visibility: GeoLabelVisibility;
|
|
2807
|
+
presentation: 'label' | 'note' | 'none';
|
|
2808
|
+
limitation?: 'candidate-limit' | 'vertex-limit' | 'search-limit';
|
|
2809
|
+
}
|
|
2810
|
+
interface GeoPlacedLabel {
|
|
2811
|
+
id: string;
|
|
2812
|
+
anchor: Point;
|
|
2813
|
+
bounds: Rect;
|
|
2814
|
+
block: GeoTextBlock;
|
|
2815
|
+
}
|
|
2816
|
+
interface GeoLabelOverlay {
|
|
2817
|
+
diagnostics?: DesignDiagnostic[];
|
|
2818
|
+
labels: GeoPlacedLabel[];
|
|
2819
|
+
leaders: Array<{
|
|
2820
|
+
id: string;
|
|
2821
|
+
from: Point;
|
|
2822
|
+
to: Point;
|
|
2823
|
+
}>;
|
|
2824
|
+
markers: Array<{
|
|
2825
|
+
id: string;
|
|
2826
|
+
anchor: Point;
|
|
2827
|
+
number: number;
|
|
2828
|
+
}>;
|
|
2829
|
+
notes: Array<{
|
|
2830
|
+
id: string;
|
|
2831
|
+
slot: GeoCalloutNoteSlot;
|
|
2832
|
+
}>;
|
|
2833
|
+
inventory: GeoLabelInventoryEntry[];
|
|
2834
|
+
}
|
|
2835
|
+
interface GeoLabelsInput {
|
|
2836
|
+
/** Complete inventory source, including candidates beyond the visual cap. */
|
|
2837
|
+
candidates: GeoLabelCandidate[];
|
|
2838
|
+
geometries: GeoLabelGeometry[];
|
|
2839
|
+
viewport: Rect;
|
|
2840
|
+
obstacles: Rect[];
|
|
2841
|
+
/** Measured screen radius for fallback note markers. */
|
|
2842
|
+
markerRadius?: number;
|
|
2843
|
+
/** Base-map centers with constant-screen quantitative symbol radii. */
|
|
2844
|
+
symbolObstacles?: Array<{
|
|
2845
|
+
center: Point;
|
|
2846
|
+
radius: number;
|
|
2847
|
+
}>;
|
|
2848
|
+
noteSlots: GeoCalloutNoteSlot[];
|
|
2849
|
+
}
|
|
2850
|
+
interface GeoLabelsBundle extends GeoLabelsInput {
|
|
2851
|
+
initialOverlay: GeoLabelOverlay;
|
|
2852
|
+
}
|
|
2853
|
+
interface GeoLabelAffine {
|
|
2854
|
+
k: number;
|
|
2855
|
+
tx: number;
|
|
2856
|
+
ty: number;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
/** Context geometry uses the primary view's immutable fitted projection. */
|
|
2860
|
+
interface GeoDetailLayer {
|
|
2861
|
+
id: string;
|
|
2862
|
+
features: unknown;
|
|
2863
|
+
objectKey?: string;
|
|
2864
|
+
minZoom: number;
|
|
2865
|
+
maxZoom?: number;
|
|
2866
|
+
/** Assertion that decoded identity coordinates share the primary source plane. */
|
|
2867
|
+
sourcePlane?: string;
|
|
2868
|
+
}
|
|
2869
|
+
interface GeoInset {
|
|
2870
|
+
id: string;
|
|
2871
|
+
label: string;
|
|
2872
|
+
/** Canonical topology feature IDs, independent of the geo.idField data-join field. */
|
|
2873
|
+
featureIds: Array<string | number>;
|
|
2874
|
+
placement: 'bottom-left' | 'bottom-right';
|
|
2875
|
+
width: number;
|
|
2876
|
+
projection?: GeoMapProjection;
|
|
2877
|
+
/** Defaults true; false explicitly duplicates primary feature coverage. */
|
|
2878
|
+
removeFromMain?: boolean;
|
|
2879
|
+
/** Explicit existing points.key values; omission includes no points. */
|
|
2880
|
+
pointIds?: Array<string | number>;
|
|
2881
|
+
}
|
|
2882
|
+
interface GeoProjectionContext {
|
|
2883
|
+
projection: GeoMapProjection;
|
|
2884
|
+
space: 'geographic' | 'source';
|
|
2885
|
+
sourcePlane?: string;
|
|
2886
|
+
objectKey?: string;
|
|
2887
|
+
fitObjectKey?: string;
|
|
2888
|
+
}
|
|
2889
|
+
interface GeoDetailLayerLayout {
|
|
2890
|
+
id: string;
|
|
2891
|
+
minZoom: number;
|
|
2892
|
+
maxZoom?: number;
|
|
2893
|
+
/** Unstyled, context-only paths, already projected into this view. */
|
|
2894
|
+
paths: string[];
|
|
2895
|
+
}
|
|
2896
|
+
/** Each view owns its camera; observation identity deliberately excludes viewId. */
|
|
2897
|
+
interface GeoViewLayout {
|
|
2898
|
+
viewId: string;
|
|
2899
|
+
/** Map-local frame and drawing viewport, including the separately measured label. */
|
|
2900
|
+
frame: Rect;
|
|
2901
|
+
viewport: Rect;
|
|
2902
|
+
labelBounds?: Rect;
|
|
2903
|
+
label?: GeoTextBlock;
|
|
2904
|
+
coverage?: string;
|
|
2905
|
+
/** Everything below is viewport-local, in CSS pixels before camera transform. */
|
|
2906
|
+
mapSize: {
|
|
2907
|
+
width: number;
|
|
2908
|
+
height: number;
|
|
2909
|
+
};
|
|
2910
|
+
features: GeoMapFeatureMark[];
|
|
2911
|
+
borders: GeoMapBorders;
|
|
2912
|
+
pointMarks: GeoMapPointMark[];
|
|
2913
|
+
labels?: GeoLabelsBundle;
|
|
2914
|
+
focus: GeoMapFocusLayout | null;
|
|
2915
|
+
detailLayers: GeoDetailLayerLayout[];
|
|
2916
|
+
projectionContext: GeoProjectionContext;
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2634
2919
|
/**
|
|
2635
2920
|
* Table column configuration types.
|
|
2636
2921
|
*
|
|
@@ -2889,7 +3174,7 @@ interface TrendlineConfig {
|
|
|
2889
3174
|
* When it's an object, it can include properties like interpolation,
|
|
2890
3175
|
* point markers, orientation, and more.
|
|
2891
3176
|
*/
|
|
2892
|
-
interface
|
|
3177
|
+
interface MarkOptions {
|
|
2893
3178
|
/** The mark type. */
|
|
2894
3179
|
type: MarkType;
|
|
2895
3180
|
/**
|
|
@@ -3120,6 +3405,50 @@ interface MarkDef {
|
|
|
3120
3405
|
label?: string;
|
|
3121
3406
|
};
|
|
3122
3407
|
}
|
|
3408
|
+
/** Shared visual options accepted by every authored mark. */
|
|
3409
|
+
type SharedMarkOptions = Pick<MarkOptions, 'size' | 'filled' | 'opacity' | 'fillOpacity' | 'fill' | 'stroke' | 'strokeWidth' | 'tooltip' | 'clip' | 'fillPattern'>;
|
|
3410
|
+
/**
|
|
3411
|
+
* Authored mark configuration. Each mark accepts only options it understands.
|
|
3412
|
+
* String marks remain shorthand for `{ type: mark }`.
|
|
3413
|
+
* Extend this union with `type CustomMark = MarkDef & { ... }`, not an interface.
|
|
3414
|
+
*/
|
|
3415
|
+
type MarkDef = (SharedMarkOptions & {
|
|
3416
|
+
type: 'bar';
|
|
3417
|
+
} & Pick<MarkOptions, 'orient' | 'cornerRadius'>) | (SharedMarkOptions & {
|
|
3418
|
+
type: 'line';
|
|
3419
|
+
} & Pick<MarkOptions, 'point' | 'interpolate'>) | (SharedMarkOptions & {
|
|
3420
|
+
type: 'area';
|
|
3421
|
+
} & Pick<MarkOptions, 'point' | 'interpolate'>) | (SharedMarkOptions & {
|
|
3422
|
+
type: 'point';
|
|
3423
|
+
} & Pick<MarkOptions, 'trendline'>) | (SharedMarkOptions & {
|
|
3424
|
+
type: 'circle';
|
|
3425
|
+
}) | (SharedMarkOptions & {
|
|
3426
|
+
type: 'arc';
|
|
3427
|
+
} & Pick<MarkOptions, 'innerRadius' | 'outerRadius' | 'startAngle' | 'endAngle' | 'centerLabel'>) | (SharedMarkOptions & {
|
|
3428
|
+
type: 'text';
|
|
3429
|
+
} & Pick<MarkOptions, 'dx' | 'dy' | 'align' | 'baseline' | 'fontSize'>) | (SharedMarkOptions & {
|
|
3430
|
+
type: 'rule';
|
|
3431
|
+
}) | (SharedMarkOptions & {
|
|
3432
|
+
type: 'tick';
|
|
3433
|
+
}) | (SharedMarkOptions & {
|
|
3434
|
+
type: 'rect';
|
|
3435
|
+
} & Pick<MarkOptions, 'cornerRadius'>) | (SharedMarkOptions & {
|
|
3436
|
+
type: 'lollipop';
|
|
3437
|
+
}) | (SharedMarkOptions & {
|
|
3438
|
+
type: 'beeswarm';
|
|
3439
|
+
}) | (SharedMarkOptions & {
|
|
3440
|
+
type: 'range';
|
|
3441
|
+
} & Pick<MarkOptions, 'style' | 'colorByDirection'>) | (SharedMarkOptions & {
|
|
3442
|
+
type: 'waffle';
|
|
3443
|
+
} & Pick<MarkOptions, 'units' | 'columns' | 'other' | 'cornerRadius'>) | (SharedMarkOptions & {
|
|
3444
|
+
type: 'calendar';
|
|
3445
|
+
} & Pick<MarkOptions, 'weekStart' | 'cellRadius'>) | (SharedMarkOptions & {
|
|
3446
|
+
type: 'parliament';
|
|
3447
|
+
} & Pick<MarkOptions, 'shape' | 'seatRadius' | 'majorityLine'>) | (SharedMarkOptions & {
|
|
3448
|
+
type: 'histogram';
|
|
3449
|
+
} & Pick<MarkOptions, 'orient' | 'cornerRadius' | 'binCount' | 'normalize'>) | (SharedMarkOptions & {
|
|
3450
|
+
type: 'density';
|
|
3451
|
+
} & Pick<MarkOptions, 'point' | 'interpolate' | 'bandwidth' | 'cumulative' | 'steps'>);
|
|
3123
3452
|
/** Data field type, following Vega-Lite conventions. */
|
|
3124
3453
|
type FieldType = 'quantitative' | 'temporal' | 'nominal' | 'ordinal';
|
|
3125
3454
|
/** Aggregate function applied to a field before encoding. */
|
|
@@ -3154,6 +3483,10 @@ interface AxisConfig {
|
|
|
3154
3483
|
ticks?: boolean;
|
|
3155
3484
|
/** Axis position offset in pixels. */
|
|
3156
3485
|
offset?: number;
|
|
3486
|
+
/** Angle of the title in degrees. A y-axis title at angle 0 and anchor end becomes a header. */
|
|
3487
|
+
titleAngle?: number;
|
|
3488
|
+
/** Position along the axis for the title; omission keeps the centered title. */
|
|
3489
|
+
titleAnchor?: 'start' | 'middle' | 'end';
|
|
3157
3490
|
/** Padding between axis title and axis. */
|
|
3158
3491
|
titlePadding?: number;
|
|
3159
3492
|
/** Padding between tick labels and axis. */
|
|
@@ -3485,9 +3818,8 @@ interface Encoding<TData extends DataRow = DataRow> {
|
|
|
3485
3818
|
/**
|
|
3486
3819
|
* Angular position (slice value) for arc marks (pie/donut), the canonical
|
|
3487
3820
|
* value channel in v8. Waffle and parliament marks accept it too (the same
|
|
3488
|
-
* part-to-whole value channel).
|
|
3489
|
-
*
|
|
3490
|
-
* and `y` is populated from `theta` internally). Not used by any other mark
|
|
3821
|
+
* part-to-whole value channel). The compiler populates internal `y` from
|
|
3822
|
+
* `theta`; authored `y` aliases are rejected. Not used by any other mark
|
|
3491
3823
|
* type.
|
|
3492
3824
|
*/
|
|
3493
3825
|
theta?: EncodingChannel<TData>;
|
|
@@ -3691,14 +4023,18 @@ interface ConnectorConfig {
|
|
|
3691
4023
|
type: ConnectorType;
|
|
3692
4024
|
/** Curve displacement along the chord normal, from -1 to 1. Omitted or zero preserves the automatic curve. Ignored for other connector types. */
|
|
3693
4025
|
bend?: number;
|
|
3694
|
-
/** Whether to draw an arrowhead at the data-point end. Default:
|
|
4026
|
+
/** Whether to draw an arrowhead at the data-point end. Default: false for both curve and straight. Drop-line never takes a head. */
|
|
3695
4027
|
arrow?: boolean;
|
|
3696
4028
|
}
|
|
3697
4029
|
/** Style overrides for the dot marker drawn at the data point. */
|
|
3698
4030
|
interface AnnotationDot {
|
|
3699
4031
|
/** Circle radius in pixels. Default 4. */
|
|
3700
4032
|
radius?: number;
|
|
3701
|
-
/**
|
|
4033
|
+
/**
|
|
4034
|
+
* Fill color. Defaults to `theme.colors.annotationMarkerFill`, which resolves to
|
|
4035
|
+
* the theme's opaque surface. A default dot on an endpoint marker takes the
|
|
4036
|
+
* marker's fill and stroke.
|
|
4037
|
+
*/
|
|
3702
4038
|
fill?: string;
|
|
3703
4039
|
/** Stroke color. Defaults to the connector's resolved stroke, so marker and leader read as one system. */
|
|
3704
4040
|
stroke?: string;
|
|
@@ -3709,8 +4045,6 @@ interface AnnotationDot {
|
|
|
3709
4045
|
interface AnnotationBase {
|
|
3710
4046
|
/** Stable identifier for selection and edit callbacks. When provided, edit events include this ID for reliable element matching. */
|
|
3711
4047
|
id?: string;
|
|
3712
|
-
/** Human-readable label for the annotation. */
|
|
3713
|
-
label?: string;
|
|
3714
4048
|
/** Fill color for the annotation element. */
|
|
3715
4049
|
fill?: string;
|
|
3716
4050
|
/** Stroke color for the annotation element. */
|
|
@@ -3747,14 +4081,14 @@ interface TextAnnotation extends AnnotationBase {
|
|
|
3747
4081
|
* Used for supporting context (e.g. methodology, source). Newlines in
|
|
3748
4082
|
* `text` still produce multi-line primary; subtitle is a separate block.
|
|
3749
4083
|
*
|
|
3750
|
-
* Supports the same inline `**bold**` spans as `text`.
|
|
3751
|
-
*
|
|
3752
|
-
*
|
|
4084
|
+
* Supports the same inline `**bold**` spans as `text`. The primary `text`
|
|
4085
|
+
* keeps its own weight (default 400); use `fontWeight` or `**bold**` spans
|
|
4086
|
+
* for a bold lede.
|
|
3753
4087
|
*/
|
|
3754
4088
|
subtitle?: string;
|
|
3755
|
-
/** Subtitle size in pixels. Default: round(fontSize *
|
|
4089
|
+
/** Subtitle size in pixels. Default: round(fontSize * 12 / 13). */
|
|
3756
4090
|
subtitleFontSize?: number;
|
|
3757
|
-
/**
|
|
4091
|
+
/** Display wrap width in pixels. Omitted uses min(240, plot width minus twice the padding); null disables wrapping. */
|
|
3758
4092
|
maxWidth?: number | null;
|
|
3759
4093
|
/**
|
|
3760
4094
|
* Open-ring marker drawn on the data point itself (not on the pulled-back
|
|
@@ -3781,7 +4115,7 @@ interface TextAnnotation extends AnnotationBase {
|
|
|
3781
4115
|
* Connector from label to anchor point.
|
|
3782
4116
|
* - `true` (default): straight line, no arrow
|
|
3783
4117
|
* - `'straight'`: straight line, no arrow
|
|
3784
|
-
* - `'curve'`: curved arrow
|
|
4118
|
+
* - `'curve'`: curved leader; set arrow: true for an arrowhead
|
|
3785
4119
|
* - `'drop-line'`: vertical line through the data point's x
|
|
3786
4120
|
* - `{ type, arrow? }`: object form for explicit arrow control
|
|
3787
4121
|
* - `false`: no connector
|
|
@@ -3816,6 +4150,8 @@ interface TextAnnotation extends AnnotationBase {
|
|
|
3816
4150
|
*/
|
|
3817
4151
|
interface RangeAnnotation extends AnnotationBase {
|
|
3818
4152
|
type: 'range';
|
|
4153
|
+
/** Text drawn with the range band. */
|
|
4154
|
+
label?: string;
|
|
3819
4155
|
/** Start of the range on the x-axis. */
|
|
3820
4156
|
x1?: string | number;
|
|
3821
4157
|
/** End of the range on the x-axis. */
|
|
@@ -3838,7 +4174,7 @@ interface RangeAnnotation extends AnnotationBase {
|
|
|
3838
4174
|
labelOffset?: AnnotationOffset;
|
|
3839
4175
|
/** Anchor direction for the range label. */
|
|
3840
4176
|
labelAnchor?: AnnotationAnchor;
|
|
3841
|
-
/** Font size override for the range label (px). Default:
|
|
4177
|
+
/** Font size override for the range label (px). Default: theme small (12px). */
|
|
3842
4178
|
fontSize?: number;
|
|
3843
4179
|
/** Font weight override for the range label. Default: 500. */
|
|
3844
4180
|
fontWeight?: number;
|
|
@@ -3848,14 +4184,10 @@ interface RangeAnnotation extends AnnotationBase {
|
|
|
3848
4184
|
* Useful for baselines (zero), targets, or thresholds.
|
|
3849
4185
|
*/
|
|
3850
4186
|
interface RefLineAnnotation extends AnnotationBase {
|
|
3851
|
-
/**
|
|
3852
|
-
* Discriminant. `'refline'` is canonical and the only value in the type.
|
|
3853
|
-
* `'rule'` (it collides with the `rule` mark type) is still accepted at
|
|
3854
|
-
* runtime for backward compatibility -- the spec-sugar pass rewrites it to
|
|
3855
|
-
* `'refline'` with a deprecation warning before validation -- but it is not
|
|
3856
|
-
* part of this type. Use `'refline'`.
|
|
3857
|
-
*/
|
|
4187
|
+
/** Reference-line annotation discriminant. Older rule aliases require migrateSpecV8. */
|
|
3858
4188
|
type: 'refline';
|
|
4189
|
+
/** Text drawn with the reference line. */
|
|
4190
|
+
label?: string;
|
|
3859
4191
|
/** X-axis value for a vertical reference line. */
|
|
3860
4192
|
x?: string | number;
|
|
3861
4193
|
/** Y-axis value for a horizontal reference line. */
|
|
@@ -3868,11 +4200,11 @@ interface RefLineAnnotation extends AnnotationBase {
|
|
|
3868
4200
|
strokeWidth?: number;
|
|
3869
4201
|
/** Pixel offset for the reference line label. */
|
|
3870
4202
|
labelOffset?: AnnotationOffset;
|
|
3871
|
-
/**
|
|
4203
|
+
/** Screen-space label placement. Outside reserves a right gutter or top lane; omission uses auto unless labelAnchor is authored. */
|
|
3872
4204
|
labelPlacement?: 'auto' | 'start' | 'end' | 'outside';
|
|
3873
4205
|
/** Anchor direction for the reference line label. */
|
|
3874
4206
|
labelAnchor?: AnnotationAnchor;
|
|
3875
|
-
/** Label font size in pixels. Default:
|
|
4207
|
+
/** Label font size in pixels. Default: theme small (12px). */
|
|
3876
4208
|
fontSize?: number;
|
|
3877
4209
|
/** Label font weight. Default: 400. */
|
|
3878
4210
|
fontWeight?: number;
|
|
@@ -3895,8 +4227,7 @@ type Annotation = TextAnnotation | RangeAnnotation | RefLineAnnotation;
|
|
|
3895
4227
|
*/
|
|
3896
4228
|
type DarkMode = 'auto' | 'force' | 'off';
|
|
3897
4229
|
/**
|
|
3898
|
-
* Per-element chrome theme
|
|
3899
|
-
* backward-compatible) or an object with full typography control.
|
|
4230
|
+
* Per-element chrome theme typography controls.
|
|
3900
4231
|
*/
|
|
3901
4232
|
interface ChromeThemeOverride {
|
|
3902
4233
|
/** Text color. Accepts a TokenValue for light/dark pairs. */
|
|
@@ -3958,6 +4289,12 @@ interface ThemeConfig {
|
|
|
3958
4289
|
annotationMarkerFill?: TokenValue;
|
|
3959
4290
|
/** Annotation plate color. Accepts a TokenValue light/dark pair. */
|
|
3960
4291
|
annotationPlate?: TokenValue;
|
|
4292
|
+
/** Optional map missing-data and geographic border ink. */
|
|
4293
|
+
gridlineZero?: TokenValue;
|
|
4294
|
+
mapNoDataFill?: TokenValue;
|
|
4295
|
+
mapNoDataHatch?: TokenValue;
|
|
4296
|
+
mapInteriorBorder?: TokenValue;
|
|
4297
|
+
mapOutlineBorder?: TokenValue;
|
|
3961
4298
|
/** Semantic color for positive/up-trend values. Accepts a TokenValue for light/dark pairs. */
|
|
3962
4299
|
positive?: TokenValue;
|
|
3963
4300
|
/** Semantic color for negative/down-trend values. Accepts a TokenValue for light/dark pairs. */
|
|
@@ -3977,14 +4314,17 @@ interface ThemeConfig {
|
|
|
3977
4314
|
subtitle?: number;
|
|
3978
4315
|
/** Body text (tooltips, legend labels). Default: 13. */
|
|
3979
4316
|
body?: number;
|
|
3980
|
-
/** Small text (source line, footer). Default:
|
|
4317
|
+
/** Small text (source line, footer). Default: 12. */
|
|
3981
4318
|
small?: number;
|
|
3982
|
-
/** Axis tick labels. Default:
|
|
4319
|
+
/** Axis tick labels. Default: 12. */
|
|
3983
4320
|
axisTick?: number;
|
|
3984
4321
|
/** KPI metric uppercase label. Default: 10. */
|
|
3985
4322
|
metricLabel?: number;
|
|
3986
4323
|
/** KPI metric primary value. Default: 22. Delta/secondary derive from this. */
|
|
3987
4324
|
metricValue?: number;
|
|
4325
|
+
/** Series-name and numerical endpoint font sizes in pixels. */
|
|
4326
|
+
endpointLabel?: number;
|
|
4327
|
+
endpointValue?: number;
|
|
3988
4328
|
};
|
|
3989
4329
|
/** Font weight overrides. Partial — only specified keys are overridden. */
|
|
3990
4330
|
weights?: {
|
|
@@ -4014,27 +4354,29 @@ interface ThemeConfig {
|
|
|
4014
4354
|
xAxisHeight?: number;
|
|
4015
4355
|
/** Gap in pixels between the x-axis line and tick label text. Increase when larger axisTick fonts sit too close to the axis line. */
|
|
4016
4356
|
xAxisLabelPadding?: number;
|
|
4357
|
+
/** Endpoint block separation, internal value gap, and plot-to-column gap. */
|
|
4358
|
+
endpointEntryGap?: number;
|
|
4359
|
+
endpointValueGap?: number;
|
|
4360
|
+
endpointColumnGap?: number;
|
|
4017
4361
|
};
|
|
4018
4362
|
/** Border radius for chart container and tooltips. */
|
|
4019
4363
|
borderRadius?: number;
|
|
4020
4364
|
/**
|
|
4021
|
-
* Per-element chrome
|
|
4022
|
-
* (backward-compatible), or a ChromeThemeOverride object for full
|
|
4023
|
-
* typography control (color, fontSize, fontWeight, lineHeight).
|
|
4365
|
+
* Per-element chrome typography control (color, fontSize, fontWeight, lineHeight).
|
|
4024
4366
|
*/
|
|
4025
4367
|
chrome?: {
|
|
4026
4368
|
/** Eyebrow (kicker) style override. */
|
|
4027
|
-
eyebrow?: ChromeThemeOverride
|
|
4369
|
+
eyebrow?: ChromeThemeOverride;
|
|
4028
4370
|
/** Title style override. */
|
|
4029
|
-
title?: ChromeThemeOverride
|
|
4371
|
+
title?: ChromeThemeOverride;
|
|
4030
4372
|
/** Subtitle style override. */
|
|
4031
|
-
subtitle?: ChromeThemeOverride
|
|
4373
|
+
subtitle?: ChromeThemeOverride;
|
|
4032
4374
|
/** Source/attribution style override. */
|
|
4033
|
-
source?: ChromeThemeOverride
|
|
4375
|
+
source?: ChromeThemeOverride;
|
|
4034
4376
|
/** Byline style override. */
|
|
4035
|
-
byline?: ChromeThemeOverride
|
|
4377
|
+
byline?: ChromeThemeOverride;
|
|
4036
4378
|
/** Footer style override. */
|
|
4037
|
-
footer?: ChromeThemeOverride
|
|
4379
|
+
footer?: ChromeThemeOverride;
|
|
4038
4380
|
};
|
|
4039
4381
|
/**
|
|
4040
4382
|
* Editorial rule above the chrome block: a short colored bar (the
|
|
@@ -4042,12 +4384,12 @@ interface ThemeConfig {
|
|
|
4042
4384
|
*/
|
|
4043
4385
|
rule?: {
|
|
4044
4386
|
/** Rule color. Accepts a TokenValue for light/dark pairs. */
|
|
4045
|
-
color
|
|
4387
|
+
color?: TokenValue;
|
|
4046
4388
|
/** Rule length in pixels. */
|
|
4047
|
-
width
|
|
4389
|
+
width?: number;
|
|
4048
4390
|
/** Rule height in pixels. */
|
|
4049
|
-
thickness
|
|
4050
|
-
};
|
|
4391
|
+
thickness?: number;
|
|
4392
|
+
} | null;
|
|
4051
4393
|
/**
|
|
4052
4394
|
* Series color assignment strategy.
|
|
4053
4395
|
* Default: 'palette' (full categorical palette always, zero visual drift).
|
|
@@ -4058,12 +4400,17 @@ interface ThemeConfig {
|
|
|
4058
4400
|
* Label density mode controlling how many data labels are shown.
|
|
4059
4401
|
* - 'all': show every label, skip collision detection
|
|
4060
4402
|
* - 'auto': show labels with collision detection (default)
|
|
4061
|
-
* - 'endpoints': show only first and last per series
|
|
4403
|
+
* - 'endpoints': show only first and last per series
|
|
4404
|
+
*
|
|
4405
|
+
* Line and area marks draw no value labels; identify their series with
|
|
4406
|
+
* `endpointLabels` or the legend.
|
|
4062
4407
|
* - 'none': hide all labels (rely on tooltips and legend)
|
|
4063
4408
|
*/
|
|
4064
4409
|
type LabelDensity = 'all' | 'auto' | 'endpoints' | 'none';
|
|
4065
4410
|
/** Label display configuration for chart data labels. */
|
|
4066
4411
|
interface LabelConfig {
|
|
4412
|
+
/** Placement for bar/column values. Column is only supported for simple horizontal bars. */
|
|
4413
|
+
placement?: 'adaptive' | 'inside' | 'outside' | 'column';
|
|
4067
4414
|
/** How many labels to show. Defaults to 'auto'. */
|
|
4068
4415
|
density?: LabelDensity;
|
|
4069
4416
|
/** Number format override for label values (d3-format string, e.g. ",.0f"). */
|
|
@@ -4074,12 +4421,6 @@ interface LabelConfig {
|
|
|
4074
4421
|
suffix?: string;
|
|
4075
4422
|
/** Fixed CSS color for all labels. Overrides the default fill-derived color. */
|
|
4076
4423
|
color?: string;
|
|
4077
|
-
/**
|
|
4078
|
-
* Per-series pixel offsets for fine-tuning label positions, keyed by series name.
|
|
4079
|
-
* @deprecated Per-series pixel offsets are a workaround for collision bugs
|
|
4080
|
-
* now fixed by the layout engine. Will be removed in a future version.
|
|
4081
|
-
*/
|
|
4082
|
-
offsets?: Record<string, AnnotationOffset>;
|
|
4083
4424
|
/** Font size in pixels for bar/column value labels. */
|
|
4084
4425
|
fontSize?: number;
|
|
4085
4426
|
}
|
|
@@ -4149,19 +4490,18 @@ type EndpointLabelContent = 'label' | 'value' | 'label value';
|
|
|
4149
4490
|
* for multi-series line/area charts. Each entry pairs the series name with its
|
|
4150
4491
|
* last formatted value, optionally anchored to the line by an open-circle marker.
|
|
4151
4492
|
*
|
|
4152
|
-
* The column
|
|
4153
|
-
*
|
|
4154
|
-
* follow this truth table for ≥2-series line/area charts:
|
|
4493
|
+
* The column and traditional legend are independent identification surfaces.
|
|
4494
|
+
* For multi-series line/area charts:
|
|
4155
4495
|
*
|
|
4156
|
-
* | `legend.show` | `endpointLabels` | Traditional legend | Endpoint column |
|
|
4157
|
-
*
|
|
4158
|
-
* | unset | unset | hidden
|
|
4159
|
-
* | true
|
|
4160
|
-
* | unset | false | shown
|
|
4161
|
-
* | false | false | hidden
|
|
4162
|
-
* | true
|
|
4163
|
-
* | false | true
|
|
4164
|
-
* | true
|
|
4496
|
+
* | `legend.show` | `endpointLabels` | Traditional legend | Endpoint column |
|
|
4497
|
+
* |--|--|--|--|
|
|
4498
|
+
* | unset | unset | hidden | shown |
|
|
4499
|
+
* | true | unset | shown | shown |
|
|
4500
|
+
* | unset | false | shown | hidden |
|
|
4501
|
+
* | false | false | hidden (accessibility warning) | hidden |
|
|
4502
|
+
* | true | false | shown | hidden |
|
|
4503
|
+
* | false | true | hidden | shown |
|
|
4504
|
+
* | true | true | shown | shown |
|
|
4165
4505
|
*
|
|
4166
4506
|
* Single-series charts: column is hidden by default (nothing to identify).
|
|
4167
4507
|
*
|
|
@@ -4171,6 +4511,10 @@ type EndpointLabelContent = 'label' | 'value' | 'label value';
|
|
|
4171
4511
|
* in `legend/__tests__/suppression.test.ts` enforce every cell.
|
|
4172
4512
|
*/
|
|
4173
4513
|
interface EndpointLabelsConfig {
|
|
4514
|
+
/** Stacked-area anchor: cumulative boundary or the middle of the band. Default band. */
|
|
4515
|
+
anchor?: 'boundary' | 'band';
|
|
4516
|
+
/** Series identification in the end column or fitted inside stacked bands. */
|
|
4517
|
+
placement?: 'end' | 'interior';
|
|
4174
4518
|
/** Explicit on/off. When undefined, the chart auto-decides based on series count. */
|
|
4175
4519
|
show?: boolean;
|
|
4176
4520
|
/** Maximum number of series before endpoint labels switch to a legend. Default 8. */
|
|
@@ -4202,9 +4546,12 @@ interface EndpointLabelsConfig {
|
|
|
4202
4546
|
format?: string;
|
|
4203
4547
|
/** Max wrap width in pixels for long series names. Default 96. */
|
|
4204
4548
|
width?: number;
|
|
4205
|
-
/**
|
|
4549
|
+
/**
|
|
4550
|
+
* Render a ring marker centered on the line's end point. Default true. Its
|
|
4551
|
+
* fill defaults to the opaque canvas color so the ring covers the line end.
|
|
4552
|
+
*/
|
|
4206
4553
|
showMarker?: boolean;
|
|
4207
|
-
/** Override the marker style. */
|
|
4554
|
+
/** Override the marker style. `fill: 'transparent'` keeps a see-through ring. */
|
|
4208
4555
|
markerStyle?: {
|
|
4209
4556
|
fill?: string;
|
|
4210
4557
|
stroke?: string;
|
|
@@ -4239,9 +4586,7 @@ interface SeriesStyle {
|
|
|
4239
4586
|
*/
|
|
4240
4587
|
type AnimationEase = 'smooth' | 'snappy';
|
|
4241
4588
|
/** Opt-in motion language. */
|
|
4242
|
-
type AnimationPreset = 'fluid' | 'subtle'
|
|
4243
|
-
/** @deprecated Omit preset for v8 timing. */
|
|
4244
|
-
| 'legacy';
|
|
4589
|
+
type AnimationPreset = 'fluid' | 'subtle';
|
|
4245
4590
|
/** Physical spring parameters. Quantitative motion is bounded at critical damping. */
|
|
4246
4591
|
interface SpringConfig {
|
|
4247
4592
|
stiffness?: number;
|
|
@@ -4257,7 +4602,7 @@ interface AnimationStagger {
|
|
|
4257
4602
|
}
|
|
4258
4603
|
/** Fine-grained responsive behavior configuration. */
|
|
4259
4604
|
interface ResponsiveConfig {
|
|
4260
|
-
/** Maximum eligible inline callouts below 400px container width;
|
|
4605
|
+
/** Maximum eligible inline callouts below 400px container width; default 1; null is unlimited. Pinned annotations are exempt. */
|
|
4261
4606
|
compactAnnotationLimit?: number | null;
|
|
4262
4607
|
/** Preserve the final temporal boundary before thinning interior ticks. */
|
|
4263
4608
|
preserveEnd?: boolean;
|
|
@@ -4340,10 +4685,19 @@ type Display = 'full' | 'sparkline';
|
|
|
4340
4685
|
* when the container matches the breakpoint.
|
|
4341
4686
|
*/
|
|
4342
4687
|
interface ChartSpecOverride {
|
|
4688
|
+
/** Patch axis and scale settings on existing scale-bearing channels; nested properties merge with the base. */
|
|
4689
|
+
encoding?: {
|
|
4690
|
+
[K in 'x' | 'y' | 'color' | 'size']?: {
|
|
4691
|
+
axis?: AxisConfig | false;
|
|
4692
|
+
scale?: Omit<ScaleConfig, 'scheme' | 'reverse'>;
|
|
4693
|
+
};
|
|
4694
|
+
};
|
|
4343
4695
|
/** Override editorial chrome at this breakpoint. */
|
|
4344
4696
|
chrome?: Chrome;
|
|
4345
4697
|
/** Override label configuration at this breakpoint. */
|
|
4346
4698
|
labels?: LabelSpec;
|
|
4699
|
+
/** Override endpoint labels at this breakpoint, including migrated v8 line labels. */
|
|
4700
|
+
endpointLabels?: boolean | EndpointLabelsConfig;
|
|
4347
4701
|
/** Override legend configuration at this breakpoint. */
|
|
4348
4702
|
legend?: LegendConfig;
|
|
4349
4703
|
/** Override annotations at this breakpoint. */
|
|
@@ -4381,7 +4735,6 @@ interface Metric {
|
|
|
4381
4735
|
* Encoding for arc marks (pie/donut charts).
|
|
4382
4736
|
* - `theta`: required (quantitative — the canonical slice value channel)
|
|
4383
4737
|
* - `color`: required (nominal/ordinal — the category)
|
|
4384
|
-
* - `y`: deprecated alias for `theta`, accepted for backward compatibility
|
|
4385
4738
|
*/
|
|
4386
4739
|
interface ArcEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4387
4740
|
/** Canonical value channel for arc marks (quantitative — the slice value). */
|
|
@@ -4469,8 +4822,7 @@ interface RangeEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
|
|
|
4469
4822
|
* Encoding for waffle marks (unit grids for part-to-whole counts).
|
|
4470
4823
|
* - `color`: required (nominal/ordinal, the category)
|
|
4471
4824
|
* - `theta`: the canonical quantitative share, the same part-to-whole value
|
|
4472
|
-
* channel arc marks use.
|
|
4473
|
-
* compatibility.
|
|
4825
|
+
* channel arc marks use.
|
|
4474
4826
|
*/
|
|
4475
4827
|
interface WaffleEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4476
4828
|
color: EncodingChannel<TData> | ConditionalValueDef<TData>;
|
|
@@ -4479,8 +4831,7 @@ interface WaffleEncoding<TData extends DataRow = DataRow> extends Encoding<TData
|
|
|
4479
4831
|
* Encoding for parliament marks (hemicycle seat-dot charts).
|
|
4480
4832
|
* - `color`: required (nominal/ordinal, the party)
|
|
4481
4833
|
* - `theta`: the canonical quantitative seat count, the same part-to-whole
|
|
4482
|
-
* value channel arc/waffle marks use.
|
|
4483
|
-
* for backward compatibility.
|
|
4834
|
+
* value channel arc/waffle marks use.
|
|
4484
4835
|
*/
|
|
4485
4836
|
interface ParliamentEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4486
4837
|
color: EncodingChannel<TData> | ConditionalValueDef<TData>;
|
|
@@ -4588,7 +4939,9 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4588
4939
|
/**
|
|
4589
4940
|
* How chrome height interacts with the container height budget.
|
|
4590
4941
|
*
|
|
4591
|
-
* -
|
|
4942
|
+
* - omitted: only notes and the series summary grow the figure; title,
|
|
4943
|
+
* subtitle, and source subtract from the height budget.
|
|
4944
|
+
* - `'subtract'`: the container height is fixed and chrome text
|
|
4592
4945
|
* (title/subtitle/source) is subtracted from it, shrinking the plot. This
|
|
4593
4946
|
* is the historical behavior.
|
|
4594
4947
|
* - `'grow'`: the container height is treated as the *plot* budget, and the
|
|
@@ -4596,7 +4949,7 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4596
4949
|
* its full budget (minus axis/padding overhead) regardless of how many
|
|
4597
4950
|
* lines the title wraps to.
|
|
4598
4951
|
*
|
|
4599
|
-
*
|
|
4952
|
+
* Facets and layers report engine-owned growth once.
|
|
4600
4953
|
*/
|
|
4601
4954
|
chromeLayout?: 'subtract' | 'grow';
|
|
4602
4955
|
/**
|
|
@@ -4650,7 +5003,7 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4650
5003
|
* - omitted: auto-enable for multi-series line/area charts, hide otherwise.
|
|
4651
5004
|
*
|
|
4652
5005
|
* See {@link EndpointLabelsConfig} for the full suppression truth table that
|
|
4653
|
-
* relates this flag to `legend.show
|
|
5006
|
+
* relates this flag to `legend.show`.
|
|
4654
5007
|
*/
|
|
4655
5008
|
endpointLabels?: boolean | EndpointLabelsConfig;
|
|
4656
5009
|
/**
|
|
@@ -4661,9 +5014,6 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4661
5014
|
responsive?: boolean | ResponsiveConfig;
|
|
4662
5015
|
/** Theme configuration overrides. */
|
|
4663
5016
|
theme?: ThemeConfig;
|
|
4664
|
-
/** Dark mode behavior. Defaults to "off". */
|
|
4665
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
4666
|
-
darkMode?: DarkMode;
|
|
4667
5017
|
/**
|
|
4668
5018
|
* Whether to show the OpenData watermark. Defaults to true; auto-hides
|
|
4669
5019
|
* when the container is under 200px tall (the cramped height class) unless
|
|
@@ -4781,94 +5131,94 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4781
5131
|
* };
|
|
4782
5132
|
*/
|
|
4783
5133
|
type ChartSpec<TData extends DataRow = DataRow> = (BaseChartSpec<TData> & {
|
|
4784
|
-
mark: 'arc' |
|
|
5134
|
+
mark: 'arc' | Extract<MarkDef, {
|
|
4785
5135
|
type: 'arc';
|
|
4786
|
-
}
|
|
5136
|
+
}>;
|
|
4787
5137
|
encoding: ArcEncoding<TData>;
|
|
4788
5138
|
}) | (BaseChartSpec<TData> & {
|
|
4789
|
-
mark: 'line' |
|
|
5139
|
+
mark: 'line' | Extract<MarkDef, {
|
|
4790
5140
|
type: 'line';
|
|
4791
|
-
}
|
|
5141
|
+
}>;
|
|
4792
5142
|
encoding: LineEncoding<TData>;
|
|
4793
5143
|
}) | (BaseChartSpec<TData> & {
|
|
4794
|
-
mark: 'bar' |
|
|
5144
|
+
mark: 'bar' | Extract<MarkDef, {
|
|
4795
5145
|
type: 'bar';
|
|
4796
|
-
}
|
|
5146
|
+
}>;
|
|
4797
5147
|
encoding: BarEncoding<TData>;
|
|
4798
5148
|
}) | (BaseChartSpec<TData> & {
|
|
4799
|
-
mark: 'area' |
|
|
5149
|
+
mark: 'area' | Extract<MarkDef, {
|
|
4800
5150
|
type: 'area';
|
|
4801
|
-
}
|
|
5151
|
+
}>;
|
|
4802
5152
|
encoding: AreaEncoding<TData>;
|
|
4803
5153
|
}) | (BaseChartSpec<TData> & {
|
|
4804
|
-
mark: 'point' |
|
|
5154
|
+
mark: 'point' | Extract<MarkDef, {
|
|
4805
5155
|
type: 'point';
|
|
4806
|
-
}
|
|
5156
|
+
}>;
|
|
4807
5157
|
encoding: PointEncoding<TData>;
|
|
4808
5158
|
}) | (BaseChartSpec<TData> & {
|
|
4809
|
-
mark: 'circle' |
|
|
5159
|
+
mark: 'circle' | Extract<MarkDef, {
|
|
4810
5160
|
type: 'circle';
|
|
4811
|
-
}
|
|
5161
|
+
}>;
|
|
4812
5162
|
encoding: CircleEncoding<TData>;
|
|
4813
5163
|
}) | (BaseChartSpec<TData> & {
|
|
4814
|
-
mark: 'lollipop' |
|
|
5164
|
+
mark: 'lollipop' | Extract<MarkDef, {
|
|
4815
5165
|
type: 'lollipop';
|
|
4816
|
-
}
|
|
5166
|
+
}>;
|
|
4817
5167
|
encoding: LollipopEncoding<TData>;
|
|
4818
5168
|
}) | (BaseChartSpec<TData> & {
|
|
4819
|
-
mark: 'beeswarm' |
|
|
5169
|
+
mark: 'beeswarm' | Extract<MarkDef, {
|
|
4820
5170
|
type: 'beeswarm';
|
|
4821
|
-
}
|
|
5171
|
+
}>;
|
|
4822
5172
|
encoding: BeeswarmEncoding<TData>;
|
|
4823
5173
|
}) | (BaseChartSpec<TData> & {
|
|
4824
|
-
mark: 'range' |
|
|
5174
|
+
mark: 'range' | Extract<MarkDef, {
|
|
4825
5175
|
type: 'range';
|
|
4826
|
-
}
|
|
5176
|
+
}>;
|
|
4827
5177
|
encoding: RangeEncoding<TData>;
|
|
4828
5178
|
}) | (BaseChartSpec<TData> & {
|
|
4829
|
-
mark: 'waffle' |
|
|
5179
|
+
mark: 'waffle' | Extract<MarkDef, {
|
|
4830
5180
|
type: 'waffle';
|
|
4831
|
-
}
|
|
5181
|
+
}>;
|
|
4832
5182
|
encoding: WaffleEncoding<TData>;
|
|
4833
5183
|
}) | (BaseChartSpec<TData> & {
|
|
4834
|
-
mark: 'text' |
|
|
5184
|
+
mark: 'text' | Extract<MarkDef, {
|
|
4835
5185
|
type: 'text';
|
|
4836
|
-
}
|
|
5186
|
+
}>;
|
|
4837
5187
|
encoding: TextEncoding<TData>;
|
|
4838
5188
|
}) | (BaseChartSpec<TData> & {
|
|
4839
|
-
mark: 'tick' |
|
|
5189
|
+
mark: 'tick' | Extract<MarkDef, {
|
|
4840
5190
|
type: 'tick';
|
|
4841
|
-
}
|
|
5191
|
+
}>;
|
|
4842
5192
|
encoding: TickEncoding<TData>;
|
|
4843
5193
|
}) | (BaseChartSpec<TData> & {
|
|
4844
|
-
mark: 'rect' |
|
|
5194
|
+
mark: 'rect' | Extract<MarkDef, {
|
|
4845
5195
|
type: 'rect';
|
|
4846
|
-
}
|
|
5196
|
+
}>;
|
|
4847
5197
|
encoding: RectEncoding<TData>;
|
|
4848
5198
|
}) | (BaseChartSpec<TData> & {
|
|
4849
|
-
mark: 'rule' |
|
|
5199
|
+
mark: 'rule' | Extract<MarkDef, {
|
|
4850
5200
|
type: 'rule';
|
|
4851
|
-
}
|
|
5201
|
+
}>;
|
|
4852
5202
|
encoding: Encoding<TData>;
|
|
4853
5203
|
}) | (BaseChartSpec<TData> & {
|
|
4854
|
-
mark: 'calendar' |
|
|
5204
|
+
mark: 'calendar' | Extract<MarkDef, {
|
|
4855
5205
|
type: 'calendar';
|
|
4856
|
-
}
|
|
5206
|
+
}>;
|
|
4857
5207
|
encoding: CalendarEncoding<TData>;
|
|
4858
5208
|
}) | (BaseChartSpec<TData> & {
|
|
4859
|
-
mark: 'parliament' |
|
|
5209
|
+
mark: 'parliament' | Extract<MarkDef, {
|
|
4860
5210
|
type: 'parliament';
|
|
4861
|
-
}
|
|
5211
|
+
}>;
|
|
4862
5212
|
encoding: ParliamentEncoding<TData>;
|
|
4863
5213
|
}) | (BaseChartSpec<TData> & {
|
|
4864
|
-
mark: 'histogram' |
|
|
5214
|
+
mark: 'histogram' | Extract<MarkDef, {
|
|
4865
5215
|
type: 'histogram';
|
|
4866
|
-
}
|
|
5216
|
+
}>;
|
|
4867
5217
|
encoding: HistogramEncoding<TData>;
|
|
4868
5218
|
}) | (BaseChartSpec<TData> & {
|
|
4869
|
-
mark: 'density' |
|
|
5219
|
+
mark: 'density' | Extract<MarkDef, {
|
|
4870
5220
|
type: 'density';
|
|
4871
|
-
}
|
|
5221
|
+
}>;
|
|
4872
5222
|
encoding: DensityEncoding<TData>;
|
|
4873
5223
|
});
|
|
4874
5224
|
/** Row density for tables. Maps to 40 / 48 / 56px row heights. */
|
|
@@ -4896,9 +5246,6 @@ interface TableSpec {
|
|
|
4896
5246
|
chrome?: Chrome;
|
|
4897
5247
|
/** Theme configuration overrides. */
|
|
4898
5248
|
theme?: ThemeConfig;
|
|
4899
|
-
/** Dark mode behavior. */
|
|
4900
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
4901
|
-
darkMode?: DarkMode;
|
|
4902
5249
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
4903
5250
|
watermark?: boolean;
|
|
4904
5251
|
/** Enable client-side search/filter. */
|
|
@@ -4927,10 +5274,6 @@ interface TableSpec {
|
|
|
4927
5274
|
totalRow?: boolean | {
|
|
4928
5275
|
label?: string;
|
|
4929
5276
|
};
|
|
4930
|
-
/**
|
|
4931
|
-
* @deprecated Use `density: 'condensed'`. Still honored, with a warning.
|
|
4932
|
-
*/
|
|
4933
|
-
compact?: boolean;
|
|
4934
5277
|
/** Whether the table adapts to container width. Defaults to true. */
|
|
4935
5278
|
responsive?: boolean;
|
|
4936
5279
|
/** Animation configuration for entrance animations. */
|
|
@@ -5068,9 +5411,6 @@ interface GraphSpec {
|
|
|
5068
5411
|
annotations?: Annotation[];
|
|
5069
5412
|
/** Theme configuration overrides. */
|
|
5070
5413
|
theme?: ThemeConfig;
|
|
5071
|
-
/** Dark mode behavior. */
|
|
5072
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5073
|
-
darkMode?: DarkMode;
|
|
5074
5414
|
/**
|
|
5075
5415
|
* Motion configuration. DEFAULT-ON: omit for full defaults, `false` to opt
|
|
5076
5416
|
* out of choreography (layout warmup still applies).
|
|
@@ -5193,13 +5533,16 @@ interface LayerSpec<TData extends DataRow = DataRow> {
|
|
|
5193
5533
|
labels?: LabelSpec;
|
|
5194
5534
|
/** Legend display configuration. */
|
|
5195
5535
|
legend?: LegendConfig;
|
|
5196
|
-
/**
|
|
5197
|
-
|
|
5536
|
+
/**
|
|
5537
|
+
* Responsive behavior for the composed chart, with the same meaning as
|
|
5538
|
+
* `ChartSpec.responsive`: `true`/`false` enables/disables container-width
|
|
5539
|
+
* adaptation, and a `ResponsiveConfig` object gives fine-grained control
|
|
5540
|
+
* (e.g. `{ compactAnnotationLimit: null }`). When omitted, the first leaf
|
|
5541
|
+
* layer's `responsive` applies.
|
|
5542
|
+
*/
|
|
5543
|
+
responsive?: boolean | ResponsiveConfig;
|
|
5198
5544
|
/** Theme configuration overrides. */
|
|
5199
5545
|
theme?: ThemeConfig;
|
|
5200
|
-
/** Dark mode behavior. Defaults to "off". */
|
|
5201
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5202
|
-
darkMode?: DarkMode;
|
|
5203
5546
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5204
5547
|
watermark?: boolean;
|
|
5205
5548
|
/** Resolution strategy for shared scales/axes/legends. */
|
|
@@ -5285,23 +5628,10 @@ interface SankeySpec {
|
|
|
5285
5628
|
legend?: LegendConfig;
|
|
5286
5629
|
/** Theme configuration overrides. */
|
|
5287
5630
|
theme?: ThemeConfig;
|
|
5288
|
-
/** Dark mode behavior. Defaults to "off". */
|
|
5289
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5290
|
-
darkMode?: DarkMode;
|
|
5291
5631
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5292
5632
|
watermark?: boolean;
|
|
5293
5633
|
/** Animation configuration for entrance animations. */
|
|
5294
5634
|
animation?: AnimationSpec;
|
|
5295
|
-
/**
|
|
5296
|
-
* d3-format string applied to flow values in tooltips and ARIA labels.
|
|
5297
|
-
* Uses the literal suffix extension: ".0f%" appends "%" to the formatted
|
|
5298
|
-
* number (data value 28 renders as "28%"). For currency: "$,.0f" or "$~s".
|
|
5299
|
-
* For SI suffixes: "~s" (renders 1000 as "1k"). When not set, values use
|
|
5300
|
-
* the default number formatter.
|
|
5301
|
-
* @deprecated Use the encoding channel's `format` field instead. This
|
|
5302
|
-
* property is expanded into the encoding during compilation.
|
|
5303
|
-
*/
|
|
5304
|
-
valueFormat?: string;
|
|
5305
5635
|
}
|
|
5306
5636
|
/** Encoding channels specific to tile map visualizations. */
|
|
5307
5637
|
interface TileMapEncoding {
|
|
@@ -5350,9 +5680,6 @@ interface TileMapSpec {
|
|
|
5350
5680
|
legend?: LegendConfig;
|
|
5351
5681
|
/** Theme configuration overrides. */
|
|
5352
5682
|
theme?: ThemeConfig;
|
|
5353
|
-
/** Dark mode behavior. Defaults to "off". */
|
|
5354
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5355
|
-
darkMode?: DarkMode;
|
|
5356
5683
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5357
5684
|
watermark?: boolean;
|
|
5358
5685
|
/** Animation configuration for entrance animations. */
|
|
@@ -5397,6 +5724,14 @@ interface GeoMapZoomConfig {
|
|
|
5397
5724
|
}
|
|
5398
5725
|
/** Geo configuration for map specs. */
|
|
5399
5726
|
interface GeoMapGeo {
|
|
5727
|
+
/** Primary topology object; omission retains first-object behavior. */
|
|
5728
|
+
objectKey?: string;
|
|
5729
|
+
/** Fit against this primary-topology object, independent of contextual detail. */
|
|
5730
|
+
fitObjectKey?: string;
|
|
5731
|
+
/** Named assertion of the decoded coordinate plane for identity detail. */
|
|
5732
|
+
sourcePlane?: string;
|
|
5733
|
+
detailLayers?: GeoDetailLayer[];
|
|
5734
|
+
insets?: GeoInset[];
|
|
5400
5735
|
/** TopoJSON topology object. User imports this from us-atlas, world-atlas, or their own source. */
|
|
5401
5736
|
features: unknown;
|
|
5402
5737
|
/** Field in the TopoJSON feature properties to use as the join key. Defaults to 'id'. */
|
|
@@ -5426,12 +5761,47 @@ interface GeoMapGeo {
|
|
|
5426
5761
|
*/
|
|
5427
5762
|
zoom?: boolean | GeoMapZoomConfig;
|
|
5428
5763
|
}
|
|
5764
|
+
/** Explicit map anchor; feature and point identities occupy separate namespaces. */
|
|
5765
|
+
type GeoAnchor = ({
|
|
5766
|
+
kind: 'feature';
|
|
5767
|
+
id: string | number;
|
|
5768
|
+
} | {
|
|
5769
|
+
kind: 'point';
|
|
5770
|
+
id: string | number;
|
|
5771
|
+
} | {
|
|
5772
|
+
kind: 'coordinate';
|
|
5773
|
+
space: 'geographic' | 'source';
|
|
5774
|
+
x: number;
|
|
5775
|
+
y: number;
|
|
5776
|
+
}) & {
|
|
5777
|
+
viewId?: string;
|
|
5778
|
+
layerId?: string;
|
|
5779
|
+
};
|
|
5780
|
+
/** Static authored geographic explanation; plain text, without chart editing semantics. */
|
|
5781
|
+
interface GeoCallout {
|
|
5782
|
+
id: string;
|
|
5783
|
+
anchor: GeoAnchor;
|
|
5784
|
+
text: string;
|
|
5785
|
+
subtitle?: string;
|
|
5786
|
+
priority?: number;
|
|
5787
|
+
minZoom?: number;
|
|
5788
|
+
maxZoom?: number;
|
|
5789
|
+
offset?: {
|
|
5790
|
+
dx: number;
|
|
5791
|
+
dy: number;
|
|
5792
|
+
};
|
|
5793
|
+
maxWidth?: number;
|
|
5794
|
+
}
|
|
5429
5795
|
/** Encoding channels specific to map visualizations. */
|
|
5430
5796
|
interface GeoMapEncoding {
|
|
5431
5797
|
/** Join key field in the data. Required for choropleth; optional in basemap-only mode (points layer with empty data). */
|
|
5432
5798
|
key?: EncodingChannel;
|
|
5433
5799
|
/** Color encoding (quantitative or nominal). Drives fill color of features. Optional when a points layer is present (basemap-only mode). */
|
|
5434
5800
|
color?: EncodingChannel;
|
|
5801
|
+
/** Explicit feature label field, read from its joined row or same-named topology property. */
|
|
5802
|
+
text?: EncodingChannel;
|
|
5803
|
+
/** Higher finite quantitative values win label placement priority. Requires text. */
|
|
5804
|
+
textPriority?: EncodingChannel;
|
|
5435
5805
|
/** Tooltip encoding (optional). */
|
|
5436
5806
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5437
5807
|
}
|
|
@@ -5443,10 +5813,14 @@ interface GeoMapPointsLayer {
|
|
|
5443
5813
|
longitude: EncodingChannel;
|
|
5444
5814
|
/** Field holding latitude (y coordinate). */
|
|
5445
5815
|
latitude: EncodingChannel;
|
|
5446
|
-
/** Optional quantitative size encoding. Area-proportional: r proportional to sqrt(value).
|
|
5816
|
+
/** Optional quantitative size encoding. Area-proportional: r proportional to sqrt(value). A proportional size key explains the resolved radius scale. */
|
|
5447
5817
|
size?: EncodingChannel;
|
|
5448
5818
|
/** Optional color encoding (nominal or quantitative). Independent scale from choropleth. */
|
|
5449
5819
|
color?: EncodingChannel;
|
|
5820
|
+
/** Explicit point label field. Requires a unique points.key. */
|
|
5821
|
+
text?: EncodingChannel;
|
|
5822
|
+
/** Quantitative label priority; defaults to the point size value. Requires text. */
|
|
5823
|
+
textPriority?: EncodingChannel;
|
|
5450
5824
|
/** Tooltip channel(s), same shape as GeoMapEncoding.tooltip. */
|
|
5451
5825
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5452
5826
|
/** Stable id for event callbacks, and the key used to match points across
|
|
@@ -5468,24 +5842,23 @@ interface GeoMapSpec {
|
|
|
5468
5842
|
encoding: GeoMapEncoding;
|
|
5469
5843
|
/** Editorial chrome (title, subtitle, source, byline, footer). */
|
|
5470
5844
|
chrome?: Chrome;
|
|
5845
|
+
/** Optional static distribution and reader active-value presentation. Both default to false. */
|
|
5846
|
+
colorKey?: {
|
|
5847
|
+
activeValue?: boolean;
|
|
5848
|
+
distribution?: boolean;
|
|
5849
|
+
};
|
|
5471
5850
|
/** Legend display configuration. */
|
|
5472
5851
|
legend?: LegendConfig;
|
|
5473
5852
|
/** Theme configuration overrides. */
|
|
5474
5853
|
theme?: ThemeConfig;
|
|
5475
|
-
/** Dark mode behavior. Defaults to "off". */
|
|
5476
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5477
|
-
darkMode?: DarkMode;
|
|
5478
5854
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5479
5855
|
watermark?: boolean;
|
|
5480
5856
|
/** Optional point/symbol layer rendered above choropleth features. */
|
|
5481
5857
|
points?: GeoMapPointsLayer;
|
|
5858
|
+
/** Authored labels with explicit feature, point, or coordinate anchors. */
|
|
5859
|
+
callouts?: GeoCallout[];
|
|
5482
5860
|
/** Animation configuration for entrance animations. */
|
|
5483
5861
|
animation?: AnimationSpec;
|
|
5484
|
-
/**
|
|
5485
|
-
* d3-format string applied to color values in tooltips and legend.
|
|
5486
|
-
* @deprecated Use the encoding channel's `format` field instead.
|
|
5487
|
-
*/
|
|
5488
|
-
valueFormat?: string;
|
|
5489
5862
|
}
|
|
5490
5863
|
interface BarListSpec {
|
|
5491
5864
|
/** Discriminant: always "barlist". */
|
|
@@ -5507,20 +5880,10 @@ interface BarListSpec {
|
|
|
5507
5880
|
chrome?: Chrome;
|
|
5508
5881
|
/** Theme configuration overrides. */
|
|
5509
5882
|
theme?: ThemeConfig;
|
|
5510
|
-
/** Dark mode behavior. Defaults to "off". */
|
|
5511
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5512
|
-
darkMode?: DarkMode;
|
|
5513
5883
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5514
5884
|
watermark?: boolean;
|
|
5515
5885
|
/** Animation configuration for entrance animations. */
|
|
5516
5886
|
animation?: AnimationSpec;
|
|
5517
|
-
/**
|
|
5518
|
-
* d3-format string applied to bar values and tooltips.
|
|
5519
|
-
* Examples: ".1f" for one decimal, "$,.0f" for currency, "~s" for SI.
|
|
5520
|
-
* @deprecated Use the encoding channel's `format` field instead. This
|
|
5521
|
-
* property is expanded into the encoding during compilation.
|
|
5522
|
-
*/
|
|
5523
|
-
valueFormat?: string;
|
|
5524
5887
|
}
|
|
5525
5888
|
/** Encoding channels for a barlist visualization. */
|
|
5526
5889
|
interface BarListEncoding {
|
|
@@ -5860,11 +6223,7 @@ declare function isGeoMapSpec(spec: VizSpec | Record<string, unknown>): spec is
|
|
|
5860
6223
|
declare function isTextAnnotation(annotation: Annotation): annotation is TextAnnotation;
|
|
5861
6224
|
/** Check if an annotation is a RangeAnnotation. */
|
|
5862
6225
|
declare function isRangeAnnotation(annotation: Annotation): annotation is RangeAnnotation;
|
|
5863
|
-
/**
|
|
5864
|
-
* Check if an annotation is a RefLineAnnotation. Also accepts the deprecated
|
|
5865
|
-
* `'rule'` type at runtime (pre-sugar-expansion input), since `annotation.type`
|
|
5866
|
-
* may not yet be narrowed to the canonical `'refline'` form.
|
|
5867
|
-
*/
|
|
6226
|
+
/** Check if an annotation is a RefLineAnnotation. */
|
|
5868
6227
|
declare function isRefLineAnnotation(annotation: Annotation): annotation is RefLineAnnotation;
|
|
5869
6228
|
/** Human-readable display names for mark types (used in alt text, error messages). */
|
|
5870
6229
|
declare const MARK_DISPLAY_NAMES: Record<MarkType, string>;
|
|
@@ -5885,7 +6244,7 @@ interface EditOp {
|
|
|
5885
6244
|
op: 'set' | 'remove' | 'add';
|
|
5886
6245
|
path: string;
|
|
5887
6246
|
value?: unknown;
|
|
5888
|
-
/** Preconditions on the nearest authored annotation ancestor. */
|
|
6247
|
+
/** Preconditions on the nearest authored annotation ancestor. `text` matches a refline/range `label`. */
|
|
5889
6248
|
expect?: {
|
|
5890
6249
|
id?: string;
|
|
5891
6250
|
type?: string;
|
|
@@ -5909,29 +6268,24 @@ type ElementRef = {
|
|
|
5909
6268
|
type: 'annotation';
|
|
5910
6269
|
index: number;
|
|
5911
6270
|
id?: string;
|
|
5912
|
-
/** RFC 6901 JSON Pointer to the
|
|
6271
|
+
/** Root-relative RFC 6901 JSON Pointer to the authored object this ref identifies (e.g. `/layer/0/annotations/2`, `/chrome/title`). Always set on refs the chart emits or returns; legend refs point at `/legend`. Edited properties are addressed by `EditOp.path`. */
|
|
5913
6272
|
path?: string;
|
|
5914
6273
|
/** Rendered facet instance; source identity remains index/id/path. */
|
|
5915
6274
|
facetInstance?: string;
|
|
5916
6275
|
} | {
|
|
5917
6276
|
type: 'chrome';
|
|
5918
6277
|
key: ChromeKey;
|
|
5919
|
-
/** RFC 6901 JSON Pointer to the
|
|
5920
|
-
path?: string;
|
|
5921
|
-
} | {
|
|
5922
|
-
type: 'series-label';
|
|
5923
|
-
series: string;
|
|
5924
|
-
/** RFC 6901 JSON Pointer to the edited property in the spec. */
|
|
6278
|
+
/** Root-relative RFC 6901 JSON Pointer to the authored object this ref identifies (e.g. `/layer/0/annotations/2`, `/chrome/title`). Always set on refs the chart emits or returns; legend refs point at `/legend`. Edited properties are addressed by `EditOp.path`. */
|
|
5925
6279
|
path?: string;
|
|
5926
6280
|
} | {
|
|
5927
6281
|
type: 'legend';
|
|
5928
|
-
/** RFC 6901 JSON Pointer to the
|
|
6282
|
+
/** Root-relative RFC 6901 JSON Pointer to the authored object this ref identifies (e.g. `/layer/0/annotations/2`, `/chrome/title`). Always set on refs the chart emits or returns; legend refs point at `/legend`. Edited properties are addressed by `EditOp.path`. */
|
|
5929
6283
|
path?: string;
|
|
5930
6284
|
} | {
|
|
5931
6285
|
type: 'legend-entry';
|
|
5932
6286
|
series: string;
|
|
5933
6287
|
index: number;
|
|
5934
|
-
/** RFC 6901 JSON Pointer to the
|
|
6288
|
+
/** Root-relative RFC 6901 JSON Pointer to the authored object this ref identifies (e.g. `/layer/0/annotations/2`, `/chrome/title`). Always set on refs the chart emits or returns; legend refs point at `/legend`. Edited properties are addressed by `EditOp.path`. */
|
|
5935
6289
|
path?: string;
|
|
5936
6290
|
};
|
|
5937
6291
|
/** Helper constructors for ergonomic ElementRef creation. */
|
|
@@ -5940,88 +6294,9 @@ declare const elementRef: {
|
|
|
5940
6294
|
type: "annotation";
|
|
5941
6295
|
}>;
|
|
5942
6296
|
readonly chrome: (key: ChromeKey, path?: string) => ElementRef;
|
|
5943
|
-
readonly seriesLabel: (series: string, path?: string) => ElementRef;
|
|
5944
6297
|
readonly legend: (path?: string) => ElementRef;
|
|
5945
6298
|
readonly legendEntry: (series: string, index: number, path?: string) => ElementRef;
|
|
5946
6299
|
};
|
|
5947
|
-
/**
|
|
5948
|
-
* Discriminated union of all element edit events.
|
|
5949
|
-
* Fired by the `onEdit` callback when any editable chart element is modified.
|
|
5950
|
-
* Covers repositioning (drag), deletion (Delete key), and text editing (double-click).
|
|
5951
|
-
* Selection events (onSelect/onDeselect) are separate callbacks, not part of this union.
|
|
5952
|
-
*
|
|
5953
|
-
* For the `annotation` variant:
|
|
5954
|
-
* - `annotation` is the ORIGINAL spec annotation (may have a stale or missing offset)
|
|
5955
|
-
* - `offset` is the NEW accumulated position after the drag completes
|
|
5956
|
-
* - To persist a drag edit back into your spec: `{ ...edit.annotation, offset: edit.offset }`
|
|
5957
|
-
*/
|
|
5958
|
-
type ElementEdit = {
|
|
5959
|
-
type: 'annotation';
|
|
5960
|
-
element: ElementRef;
|
|
5961
|
-
annotation: TextAnnotation;
|
|
5962
|
-
offset: AnnotationOffset;
|
|
5963
|
-
/** Resolved first-drag placement. Persist together with offset when supplied. */
|
|
5964
|
-
anchor?: TextAnnotation['anchor'];
|
|
5965
|
-
/** A moved annotation stays inline. */
|
|
5966
|
-
responsive?: false;
|
|
5967
|
-
} | {
|
|
5968
|
-
type: 'annotation-connector';
|
|
5969
|
-
element: ElementRef;
|
|
5970
|
-
annotation: TextAnnotation;
|
|
5971
|
-
endpoint: 'from' | 'to';
|
|
5972
|
-
offset: AnnotationOffset;
|
|
5973
|
-
} | {
|
|
5974
|
-
type: 'range-label';
|
|
5975
|
-
element: ElementRef;
|
|
5976
|
-
annotation: RangeAnnotation;
|
|
5977
|
-
labelOffset: AnnotationOffset;
|
|
5978
|
-
} | {
|
|
5979
|
-
type: 'refline-label';
|
|
5980
|
-
element: ElementRef;
|
|
5981
|
-
annotation: RefLineAnnotation;
|
|
5982
|
-
labelOffset: AnnotationOffset;
|
|
5983
|
-
} | {
|
|
5984
|
-
type: 'annotation-anchor';
|
|
5985
|
-
element: ElementRef;
|
|
5986
|
-
annotation: TextAnnotation;
|
|
5987
|
-
x: string | number;
|
|
5988
|
-
y: string | number;
|
|
5989
|
-
} | {
|
|
5990
|
-
type: 'chrome';
|
|
5991
|
-
key: ChromeKey;
|
|
5992
|
-
text: string;
|
|
5993
|
-
offset: AnnotationOffset;
|
|
5994
|
-
} | {
|
|
5995
|
-
type: 'series-label';
|
|
5996
|
-
series: string;
|
|
5997
|
-
offset: AnnotationOffset;
|
|
5998
|
-
} | {
|
|
5999
|
-
type: 'legend';
|
|
6000
|
-
offset: AnnotationOffset;
|
|
6001
|
-
}
|
|
6002
|
-
/**
|
|
6003
|
-
* Transient legend visibility toggle. Reports the same runtime show/hide
|
|
6004
|
-
* a reader triggers; not persisted by openchart. To author default-hidden
|
|
6005
|
-
* series, set `spec.hiddenSeries` directly. Hosts building spec
|
|
6006
|
-
* persistence should generally not write legend-toggle edits back into
|
|
6007
|
-
* the authored spec. `hidden: true` means the series was just hidden.
|
|
6008
|
-
*/
|
|
6009
|
-
| {
|
|
6010
|
-
type: 'legend-toggle';
|
|
6011
|
-
series: string;
|
|
6012
|
-
hidden: boolean;
|
|
6013
|
-
} | {
|
|
6014
|
-
type: 'add';
|
|
6015
|
-
annotation: TextAnnotation;
|
|
6016
|
-
} | {
|
|
6017
|
-
type: 'delete';
|
|
6018
|
-
element: ElementRef;
|
|
6019
|
-
} | {
|
|
6020
|
-
type: 'text-edit';
|
|
6021
|
-
element: ElementRef;
|
|
6022
|
-
oldText: string;
|
|
6023
|
-
newText: string;
|
|
6024
|
-
};
|
|
6025
6300
|
/**
|
|
6026
6301
|
* Event fired when a user interacts with a data mark (bar, point, line segment, etc.).
|
|
6027
6302
|
*
|
|
@@ -6048,14 +6323,6 @@ interface MarkEvent {
|
|
|
6048
6323
|
* or ChartProps (React component) to receive interaction callbacks.
|
|
6049
6324
|
*/
|
|
6050
6325
|
interface ChartEventHandlers {
|
|
6051
|
-
/**
|
|
6052
|
-
* Explicitly enable or disable edit interactions (drag, select, keyboard
|
|
6053
|
-
* delete/edit). When true, the interaction layer is wired even without
|
|
6054
|
-
* onEdit. When false, all edit interactions are suppressed even when
|
|
6055
|
-
* onEdit is provided. When omitted, each interaction block uses its
|
|
6056
|
-
* existing callback-presence gate.
|
|
6057
|
-
*/
|
|
6058
|
-
editable?: boolean;
|
|
6059
6326
|
/** Called when a data mark is clicked. */
|
|
6060
6327
|
onMarkClick?: (event: MarkEvent) => void;
|
|
6061
6328
|
/** Called when the mouse enters a data mark. */
|
|
@@ -6072,20 +6339,14 @@ interface ChartEventHandlers {
|
|
|
6072
6339
|
onHighlightChange?: (values: string[]) => void;
|
|
6073
6340
|
/** Called when an annotation element is clicked. */
|
|
6074
6341
|
onAnnotationClick?: (annotation: Annotation, event: MouseEvent, element: ElementRef) => void;
|
|
6075
|
-
/** @deprecated Use onEditTransaction to persist complete edits. */
|
|
6076
|
-
onAnnotationEdit?: (annotation: TextAnnotation, updatedOffset: AnnotationOffset) => void;
|
|
6077
6342
|
/** Unified edit callback. Fires for any spec-modifying edit (repositioning, deletion, text editing). */
|
|
6078
|
-
onEdit?: (
|
|
6343
|
+
onEdit?: (transaction: EditTransaction) => void;
|
|
6079
6344
|
/** Optional source revision, stamped on emitted transactions. */
|
|
6080
6345
|
revision?: string | number;
|
|
6081
|
-
/** Durable authored edits, applied atomically with applyEditTransaction. */
|
|
6082
|
-
onEditTransaction?: (transaction: EditTransaction) => void;
|
|
6083
6346
|
/** Fired when an element is selected via click or programmatic select(). */
|
|
6084
6347
|
onSelect?: (element: ElementRef) => void;
|
|
6085
6348
|
/** Fired when the current element is deselected (click empty, Escape, or new selection replaces old). */
|
|
6086
6349
|
onDeselect?: (element: ElementRef) => void;
|
|
6087
|
-
/** @deprecated Use onEditTransaction with a text set operation. */
|
|
6088
|
-
onTextEdit?: (element: ElementRef, oldText: string, newText: string) => void;
|
|
6089
6350
|
/**
|
|
6090
6351
|
* Fired when a "you draw it" (`youDrawIt`) drawing is revealed (button click
|
|
6091
6352
|
* or programmatic reveal), with the reader's guess in data coordinates,
|
|
@@ -6116,6 +6377,11 @@ type EditTransactionResult<T> = {
|
|
|
6116
6377
|
*/
|
|
6117
6378
|
declare function applyEditTransaction<T>(spec: T, tx: EditTransaction): EditTransactionResult<T>;
|
|
6118
6379
|
|
|
6380
|
+
/** Escape one RFC 6901 reference token: `~` becomes `~0`, then `/` becomes `~1`. */
|
|
6381
|
+
declare function encodePointerToken(token: string | number): string;
|
|
6382
|
+
/** Build a root-relative JSON Pointer from unescaped tokens. No tokens is the root, `''`. */
|
|
6383
|
+
declare function jsonPointer(...tokens: ReadonlyArray<string | number>): string;
|
|
6384
|
+
|
|
6119
6385
|
/**
|
|
6120
6386
|
* Per-mark-type encoding validation rules.
|
|
6121
6387
|
*
|
|
@@ -6189,6 +6455,115 @@ interface GraphChannelRule {
|
|
|
6189
6455
|
*/
|
|
6190
6456
|
declare const GRAPH_ENCODING_RULES: Record<string, GraphChannelRule>;
|
|
6191
6457
|
|
|
6458
|
+
interface GeoEntityRef {
|
|
6459
|
+
kind: 'feature' | 'point';
|
|
6460
|
+
id: string | number;
|
|
6461
|
+
canonicalId: string;
|
|
6462
|
+
}
|
|
6463
|
+
interface GeoReaderObservation {
|
|
6464
|
+
entity: GeoEntityRef;
|
|
6465
|
+
observation: string;
|
|
6466
|
+
persistent: boolean;
|
|
6467
|
+
datum: DataRow | null;
|
|
6468
|
+
previous?: DataRow | null;
|
|
6469
|
+
state: 'visible' | 'filtered';
|
|
6470
|
+
}
|
|
6471
|
+
interface GeoReaderSelection {
|
|
6472
|
+
preview: GeoReaderObservation | null;
|
|
6473
|
+
pinned: GeoReaderObservation[];
|
|
6474
|
+
announcement: string;
|
|
6475
|
+
}
|
|
6476
|
+
|
|
6477
|
+
type ReaderDomainValue = {
|
|
6478
|
+
kind: 'string';
|
|
6479
|
+
value: string;
|
|
6480
|
+
} | {
|
|
6481
|
+
kind: 'number';
|
|
6482
|
+
value: number;
|
|
6483
|
+
} | {
|
|
6484
|
+
kind: 'boolean';
|
|
6485
|
+
value: boolean;
|
|
6486
|
+
} | {
|
|
6487
|
+
kind: 'date';
|
|
6488
|
+
value: string;
|
|
6489
|
+
};
|
|
6490
|
+
interface ReaderBindingScope {
|
|
6491
|
+
dataset: string;
|
|
6492
|
+
transform: string;
|
|
6493
|
+
grouping: string[];
|
|
6494
|
+
xField: string;
|
|
6495
|
+
valueField: string;
|
|
6496
|
+
}
|
|
6497
|
+
interface ReaderPanelScope {
|
|
6498
|
+
id: string;
|
|
6499
|
+
facet?: {
|
|
6500
|
+
field: string;
|
|
6501
|
+
values: ReaderDomainValue[];
|
|
6502
|
+
};
|
|
6503
|
+
}
|
|
6504
|
+
interface ReaderSeries {
|
|
6505
|
+
key: string;
|
|
6506
|
+
label: string;
|
|
6507
|
+
color?: string;
|
|
6508
|
+
valueField: string;
|
|
6509
|
+
metadata?: FieldMetadata;
|
|
6510
|
+
}
|
|
6511
|
+
interface ReaderSliceMember {
|
|
6512
|
+
series: ReaderSeries;
|
|
6513
|
+
status: 'observed' | 'no-observation' | 'ambiguous';
|
|
6514
|
+
observations: ReaderObservation[];
|
|
6515
|
+
value?: number;
|
|
6516
|
+
valueStatus?: 'finite' | 'missing' | 'invalid';
|
|
6517
|
+
formattedValue?: string;
|
|
6518
|
+
}
|
|
6519
|
+
interface ReaderSlice {
|
|
6520
|
+
kind: 'slice';
|
|
6521
|
+
key: string;
|
|
6522
|
+
binding: ReaderBindingScope;
|
|
6523
|
+
panel: ReaderPanelScope;
|
|
6524
|
+
x: ReaderDomainValue;
|
|
6525
|
+
xLabel: string;
|
|
6526
|
+
revision: string;
|
|
6527
|
+
members: ReaderSliceMember[];
|
|
6528
|
+
persistent: boolean;
|
|
6529
|
+
state: 'visible' | 'filtered';
|
|
6530
|
+
}
|
|
6531
|
+
interface ReaderSliceSelection {
|
|
6532
|
+
kind: 'slices';
|
|
6533
|
+
preview: ReaderSlice | null;
|
|
6534
|
+
pinned: ReaderSlice[];
|
|
6535
|
+
announcement: string;
|
|
6536
|
+
}
|
|
6537
|
+
interface ReaderChangeMeta {
|
|
6538
|
+
reason: 'user' | 'data' | 'filter' | 'programmatic';
|
|
6539
|
+
}
|
|
6540
|
+
interface ReaderComparisonScope {
|
|
6541
|
+
dataset: string;
|
|
6542
|
+
transform: string;
|
|
6543
|
+
grouping: string[];
|
|
6544
|
+
panelId: string;
|
|
6545
|
+
}
|
|
6546
|
+
interface ReaderComparisonOperand {
|
|
6547
|
+
value: number;
|
|
6548
|
+
metadata?: FieldMetadata;
|
|
6549
|
+
binding: ReaderComparisonScope;
|
|
6550
|
+
}
|
|
6551
|
+
type ReaderComparisonResult = {
|
|
6552
|
+
status: 'comparable';
|
|
6553
|
+
absolute: number;
|
|
6554
|
+
relative?: number;
|
|
6555
|
+
unit: string;
|
|
6556
|
+
relativeUnavailable?: 'zero-baseline' | 'negative-baseline';
|
|
6557
|
+
} | {
|
|
6558
|
+
status: 'unavailable';
|
|
6559
|
+
reason: 'nonfinite' | 'missing-metadata' | 'incompatible-metadata' | 'incompatible-binding';
|
|
6560
|
+
message: string;
|
|
6561
|
+
};
|
|
6562
|
+
interface ReaderSliceIndexOptions {
|
|
6563
|
+
revision: string;
|
|
6564
|
+
binding?: DatasetBinding;
|
|
6565
|
+
}
|
|
6566
|
+
|
|
6192
6567
|
/**
|
|
6193
6568
|
* Color blindness simulation and palette distinguishability checks.
|
|
6194
6569
|
*
|
|
@@ -6423,7 +6798,7 @@ declare function adaptForLightLineStroke(color: string): string;
|
|
|
6423
6798
|
*/
|
|
6424
6799
|
declare const DEFAULT_THEME: ThemeBase;
|
|
6425
6800
|
|
|
6426
|
-
/**
|
|
6801
|
+
/** Deep-merge authored theme layers. Later layers win at each authored leaf. */
|
|
6427
6802
|
declare function mergeThemeConfig(base: ThemeConfig | undefined, override: ThemeConfig | undefined): ThemeConfig | undefined;
|
|
6428
6803
|
|
|
6429
6804
|
/**
|
|
@@ -6434,8 +6809,6 @@ declare function mergeThemeConfig(base: ThemeConfig | undefined, override: Theme
|
|
|
6434
6809
|
* onto DEFAULT_THEME, so only the deltas are specified here.
|
|
6435
6810
|
*/
|
|
6436
6811
|
|
|
6437
|
-
/** Editorial preset: the current default look. Exported for explicit selection. */
|
|
6438
|
-
declare const editorial: ThemeConfig;
|
|
6439
6812
|
/** Essay preset: serif display titles, warmer background, generous spacing. */
|
|
6440
6813
|
declare const essay: ThemeConfig;
|
|
6441
6814
|
/** Wire preset: dense, mono numerals, tighter chrome. Dashboard/agency feel. */
|
|
@@ -6466,7 +6839,7 @@ declare const broadsheet: ThemeConfig;
|
|
|
6466
6839
|
* siblings, the register a monitoring UI wants.
|
|
6467
6840
|
*/
|
|
6468
6841
|
declare const terminal: ThemeConfig;
|
|
6469
|
-
/**
|
|
6842
|
+
/** @deprecated v9 adopts clarity typography by default. Set its remaining colors explicitly; removed in v10. */
|
|
6470
6843
|
declare const clarity: ThemeConfig;
|
|
6471
6844
|
/** Documented v8 typography. This does not freeze the layout engine. */
|
|
6472
6845
|
declare const legacyEditorial: ThemeConfig;
|
|
@@ -6521,10 +6894,6 @@ declare function resolveTheme(userTheme?: ThemeConfig, base?: ThemeBase): Resolv
|
|
|
6521
6894
|
declare const FOOTNOTE_LINE_HEIGHT = 1.3;
|
|
6522
6895
|
/** Internal compiler arithmetic and compatibility fallback for hand-built layouts. */
|
|
6523
6896
|
declare function computeNoteBandHeight(input: number | Pick<ResolvedChrome, 'noteBandHeight' | 'footnotes' | 'seriesSummary'>, theme: ResolvedTheme): number;
|
|
6524
|
-
/**
|
|
6525
|
-
* @deprecated Read layout.chrome.noteBandHeight. The numeric signature remains compatible in 8.x.
|
|
6526
|
-
*/
|
|
6527
|
-
declare function footnoteBandHeight(input: number | Pick<ResolvedChrome, 'noteBandHeight' | 'footnotes' | 'seriesSummary'>, theme: ResolvedTheme): number;
|
|
6528
6897
|
/**
|
|
6529
6898
|
* Compute resolved chrome layout from a Chrome spec and resolved theme.
|
|
6530
6899
|
*
|
|
@@ -6700,14 +7069,10 @@ declare function axisTitleOffset(maxTickLabelWidth: number, titleFontSize: numbe
|
|
|
6700
7069
|
declare const NARROW_VIEWPORT_MAX = 500;
|
|
6701
7070
|
/** Extra top padding added below NARROW_VIEWPORT_MAX to clear iOS Safari browser chrome. */
|
|
6702
7071
|
declare const TOP_PAD_EXTRA_NARROW = 10;
|
|
6703
|
-
/** @deprecated Use NARROW_VIEWPORT_MAX instead. */
|
|
6704
|
-
declare const TOP_PAD_NARROW_MAX = 500;
|
|
6705
7072
|
/** Gap between category label text and chart edge on narrow viewports (< NARROW_VIEWPORT_MAX). */
|
|
6706
7073
|
declare const LABEL_GAP_COMPACT = 8;
|
|
6707
7074
|
/** Gap between category label text and chart edge on standard viewports. */
|
|
6708
7075
|
declare const LABEL_GAP_DEFAULT = 12;
|
|
6709
|
-
/** @deprecated Use NARROW_VIEWPORT_MAX instead. */
|
|
6710
|
-
declare const LABEL_GAP_NARROW_MAX = 500;
|
|
6711
7076
|
/**
|
|
6712
7077
|
* Width threshold for the medium left-label fraction cap.
|
|
6713
7078
|
* Sits between medium (400-700) and full (> 700) to prevent wide category labels
|
|
@@ -7020,8 +7385,6 @@ interface ChartBuilderOptions {
|
|
|
7020
7385
|
responsive?: boolean;
|
|
7021
7386
|
/** Theme configuration overrides. */
|
|
7022
7387
|
theme?: ThemeConfig;
|
|
7023
|
-
/** @deprecated Set darkMode on the mount instead; this option has no effect. */
|
|
7024
|
-
darkMode?: DarkMode;
|
|
7025
7388
|
}
|
|
7026
7389
|
/** Options for the dataTable builder. */
|
|
7027
7390
|
interface TableBuilderOptions {
|
|
@@ -7033,8 +7396,6 @@ interface TableBuilderOptions {
|
|
|
7033
7396
|
chrome?: Chrome;
|
|
7034
7397
|
/** Theme configuration overrides. */
|
|
7035
7398
|
theme?: ThemeConfig;
|
|
7036
|
-
/** @deprecated Set darkMode on the mount instead; this option has no effect. */
|
|
7037
|
-
darkMode?: DarkMode;
|
|
7038
7399
|
/** Enable client-side search/filter. */
|
|
7039
7400
|
search?: boolean;
|
|
7040
7401
|
/** Pagination configuration. */
|
|
@@ -7045,18 +7406,15 @@ interface TableBuilderOptions {
|
|
|
7045
7406
|
stickyFirstColumn?: boolean;
|
|
7046
7407
|
/** Row density. */
|
|
7047
7408
|
density?: TableDensity;
|
|
7048
|
-
/** @deprecated Use density. */
|
|
7049
|
-
compact?: boolean;
|
|
7050
7409
|
/** Whether the table adapts to container width. */
|
|
7051
7410
|
responsive?: boolean;
|
|
7052
7411
|
}
|
|
7053
7412
|
/**
|
|
7054
7413
|
* Infer the encoding field type from data values.
|
|
7055
7414
|
*
|
|
7056
|
-
* Samples
|
|
7057
|
-
*
|
|
7058
|
-
*
|
|
7059
|
-
* - Otherwise returns "nominal".
|
|
7415
|
+
* Samples 50 rows, ignoring nulls; more than 80% numeric or temporal values
|
|
7416
|
+
* establish a type. Numeric strings (including ISO years) are quantitative.
|
|
7417
|
+
* Strings count as temporal only when date-shaped and parseable.
|
|
7060
7418
|
*/
|
|
7061
7419
|
declare function inferFieldType(data: DataRow[], field: string): FieldType;
|
|
7062
7420
|
/**
|
|
@@ -7166,8 +7524,6 @@ interface TileMapBuilderOptions {
|
|
|
7166
7524
|
legend?: LegendConfig;
|
|
7167
7525
|
/** Theme overrides. */
|
|
7168
7526
|
theme?: ThemeConfig;
|
|
7169
|
-
/** @deprecated Set darkMode on the mount instead; this option has no effect. */
|
|
7170
|
-
darkMode?: DarkMode;
|
|
7171
7527
|
/** Whether to show the watermark. */
|
|
7172
7528
|
watermark?: boolean;
|
|
7173
7529
|
/** Animation configuration. */
|
|
@@ -7255,4 +7611,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
|
|
|
7255
7611
|
declare const CSS_TOKENS: readonly CssTokenDef[];
|
|
7256
7612
|
declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
|
|
7257
7613
|
|
|
7258
|
-
export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type
|
|
7614
|
+
export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, FLUID_SPRING, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldMetadata, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, GRAPH_ENCODING_RULES, type GeoAnchor, type GeoCallout, type GeoCalloutNoteSlot, type GeoColorKeyDescriptor, type GeoColorKeyLayout, type GeoDetailLayer, type GeoDetailLayerLayout, type GeoEntityRef, type GeoInset, type GeoLabelAffine, type GeoLabelCandidate, type GeoLabelComponent, type GeoLabelGeometry, type GeoLabelInventoryEntry, type GeoLabelOverlay, type GeoLabelVisibility, type GeoLabelsBundle, type GeoLabelsInput, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GeoMapZoomConfig, type GeoPlacedLabel, type GeoProjectionContext, type GeoReaderObservation, type GeoReaderSelection, type GeoTextBlock, type GeoViewLayout, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_MINIMAL_MAX, HEIGHT_NO_GRID_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type HistogramEncoding, type ImageColumnConfig, type ImageTableCell, type JoinAggregateTransform, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SPRING_DURATION, MAX_SR_TABLE_ROWS, MOTION_REST_THRESHOLD, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, type Metric, type MotionPhase, type MotionSample, NARROW_VIEWPORT_MAX, type NeutralRamp, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type ObservationIdentity, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type Point, type PointEncoding, type PointMark, type RadialGradient, type RangeAnnotation, type RangeEncoding, type ReaderBindingScope, type ReaderChangeMeta, type ReaderComparisonOperand, type ReaderComparisonResult, type ReaderComparisonScope, type ReaderDomainValue, type ReaderObservation, type ReaderPanelScope, type ReaderSelection, type ReaderSeries, type ReaderSlice, type ReaderSliceIndexOptions, type ReaderSliceMember, type ReaderSliceSelection, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedChromeRule, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedThemeColors, type ResolvedYouDrawIt, type ResponsiveConfig, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type SpecPatch, type SpringConfig, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, type TableBuilderOptions, type TableCell, type TableCellBase, type TableDensity, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TableTotalRow, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeRule, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, type UpdatePhaseConfig, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, annotationSource, applyEditTransaction, areaChart, axisTitleOffset, barChart, broadsheet, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, clarity, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeNoteBandHeight, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, dataTable, deepMergeSpec, defaultNumberFormatter, deriveNeutralRamp, detectCollision, donutChart, dotChart, elementRef, encodePointerToken, essay, estimateTextWidth, findAccessibleColor, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isOpaqueColor, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, jsonPointer, legacyEditorial, lineChart, maxRotatedLabelWidth, meetsAA, mergeThemeConfig, motionCSS, overlapArea, pickLabelColor, pieChart, resolveChromeEconomy, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, sampleMotion, scatterChart, simulateColorBlindness, springDuration, terminal, textAscent, tileMap, truncateRotatedLabel, truncateToWidth, wire, wrapText };
|