@opendata-ai/openchart-core 8.9.1 → 9.0.0-rc.1
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 +697 -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 +962 -5116
- package/schema/table.schema.json +64 -89
- package/schema/vizspec.schema.json +1572 -9693
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;
|
|
@@ -4344,6 +4689,8 @@ interface ChartSpecOverride {
|
|
|
4344
4689
|
chrome?: Chrome;
|
|
4345
4690
|
/** Override label configuration at this breakpoint. */
|
|
4346
4691
|
labels?: LabelSpec;
|
|
4692
|
+
/** Override endpoint labels at this breakpoint, including migrated v8 line labels. */
|
|
4693
|
+
endpointLabels?: boolean | EndpointLabelsConfig;
|
|
4347
4694
|
/** Override legend configuration at this breakpoint. */
|
|
4348
4695
|
legend?: LegendConfig;
|
|
4349
4696
|
/** Override annotations at this breakpoint. */
|
|
@@ -4381,7 +4728,6 @@ interface Metric {
|
|
|
4381
4728
|
* Encoding for arc marks (pie/donut charts).
|
|
4382
4729
|
* - `theta`: required (quantitative — the canonical slice value channel)
|
|
4383
4730
|
* - `color`: required (nominal/ordinal — the category)
|
|
4384
|
-
* - `y`: deprecated alias for `theta`, accepted for backward compatibility
|
|
4385
4731
|
*/
|
|
4386
4732
|
interface ArcEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4387
4733
|
/** Canonical value channel for arc marks (quantitative — the slice value). */
|
|
@@ -4469,8 +4815,7 @@ interface RangeEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
|
|
|
4469
4815
|
* Encoding for waffle marks (unit grids for part-to-whole counts).
|
|
4470
4816
|
* - `color`: required (nominal/ordinal, the category)
|
|
4471
4817
|
* - `theta`: the canonical quantitative share, the same part-to-whole value
|
|
4472
|
-
* channel arc marks use.
|
|
4473
|
-
* compatibility.
|
|
4818
|
+
* channel arc marks use.
|
|
4474
4819
|
*/
|
|
4475
4820
|
interface WaffleEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4476
4821
|
color: EncodingChannel<TData> | ConditionalValueDef<TData>;
|
|
@@ -4479,8 +4824,7 @@ interface WaffleEncoding<TData extends DataRow = DataRow> extends Encoding<TData
|
|
|
4479
4824
|
* Encoding for parliament marks (hemicycle seat-dot charts).
|
|
4480
4825
|
* - `color`: required (nominal/ordinal, the party)
|
|
4481
4826
|
* - `theta`: the canonical quantitative seat count, the same part-to-whole
|
|
4482
|
-
* value channel arc/waffle marks use.
|
|
4483
|
-
* for backward compatibility.
|
|
4827
|
+
* value channel arc/waffle marks use.
|
|
4484
4828
|
*/
|
|
4485
4829
|
interface ParliamentEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4486
4830
|
color: EncodingChannel<TData> | ConditionalValueDef<TData>;
|
|
@@ -4588,7 +4932,9 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4588
4932
|
/**
|
|
4589
4933
|
* How chrome height interacts with the container height budget.
|
|
4590
4934
|
*
|
|
4591
|
-
* -
|
|
4935
|
+
* - omitted: only notes and the series summary grow the figure; title,
|
|
4936
|
+
* subtitle, and source subtract from the height budget.
|
|
4937
|
+
* - `'subtract'`: the container height is fixed and chrome text
|
|
4592
4938
|
* (title/subtitle/source) is subtracted from it, shrinking the plot. This
|
|
4593
4939
|
* is the historical behavior.
|
|
4594
4940
|
* - `'grow'`: the container height is treated as the *plot* budget, and the
|
|
@@ -4596,7 +4942,7 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4596
4942
|
* its full budget (minus axis/padding overhead) regardless of how many
|
|
4597
4943
|
* lines the title wraps to.
|
|
4598
4944
|
*
|
|
4599
|
-
*
|
|
4945
|
+
* Facets and layers report engine-owned growth once.
|
|
4600
4946
|
*/
|
|
4601
4947
|
chromeLayout?: 'subtract' | 'grow';
|
|
4602
4948
|
/**
|
|
@@ -4650,7 +4996,7 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4650
4996
|
* - omitted: auto-enable for multi-series line/area charts, hide otherwise.
|
|
4651
4997
|
*
|
|
4652
4998
|
* See {@link EndpointLabelsConfig} for the full suppression truth table that
|
|
4653
|
-
* relates this flag to `legend.show
|
|
4999
|
+
* relates this flag to `legend.show`.
|
|
4654
5000
|
*/
|
|
4655
5001
|
endpointLabels?: boolean | EndpointLabelsConfig;
|
|
4656
5002
|
/**
|
|
@@ -4661,9 +5007,6 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4661
5007
|
responsive?: boolean | ResponsiveConfig;
|
|
4662
5008
|
/** Theme configuration overrides. */
|
|
4663
5009
|
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
5010
|
/**
|
|
4668
5011
|
* Whether to show the OpenData watermark. Defaults to true; auto-hides
|
|
4669
5012
|
* when the container is under 200px tall (the cramped height class) unless
|
|
@@ -4781,94 +5124,94 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
4781
5124
|
* };
|
|
4782
5125
|
*/
|
|
4783
5126
|
type ChartSpec<TData extends DataRow = DataRow> = (BaseChartSpec<TData> & {
|
|
4784
|
-
mark: 'arc' |
|
|
5127
|
+
mark: 'arc' | Extract<MarkDef, {
|
|
4785
5128
|
type: 'arc';
|
|
4786
|
-
}
|
|
5129
|
+
}>;
|
|
4787
5130
|
encoding: ArcEncoding<TData>;
|
|
4788
5131
|
}) | (BaseChartSpec<TData> & {
|
|
4789
|
-
mark: 'line' |
|
|
5132
|
+
mark: 'line' | Extract<MarkDef, {
|
|
4790
5133
|
type: 'line';
|
|
4791
|
-
}
|
|
5134
|
+
}>;
|
|
4792
5135
|
encoding: LineEncoding<TData>;
|
|
4793
5136
|
}) | (BaseChartSpec<TData> & {
|
|
4794
|
-
mark: 'bar' |
|
|
5137
|
+
mark: 'bar' | Extract<MarkDef, {
|
|
4795
5138
|
type: 'bar';
|
|
4796
|
-
}
|
|
5139
|
+
}>;
|
|
4797
5140
|
encoding: BarEncoding<TData>;
|
|
4798
5141
|
}) | (BaseChartSpec<TData> & {
|
|
4799
|
-
mark: 'area' |
|
|
5142
|
+
mark: 'area' | Extract<MarkDef, {
|
|
4800
5143
|
type: 'area';
|
|
4801
|
-
}
|
|
5144
|
+
}>;
|
|
4802
5145
|
encoding: AreaEncoding<TData>;
|
|
4803
5146
|
}) | (BaseChartSpec<TData> & {
|
|
4804
|
-
mark: 'point' |
|
|
5147
|
+
mark: 'point' | Extract<MarkDef, {
|
|
4805
5148
|
type: 'point';
|
|
4806
|
-
}
|
|
5149
|
+
}>;
|
|
4807
5150
|
encoding: PointEncoding<TData>;
|
|
4808
5151
|
}) | (BaseChartSpec<TData> & {
|
|
4809
|
-
mark: 'circle' |
|
|
5152
|
+
mark: 'circle' | Extract<MarkDef, {
|
|
4810
5153
|
type: 'circle';
|
|
4811
|
-
}
|
|
5154
|
+
}>;
|
|
4812
5155
|
encoding: CircleEncoding<TData>;
|
|
4813
5156
|
}) | (BaseChartSpec<TData> & {
|
|
4814
|
-
mark: 'lollipop' |
|
|
5157
|
+
mark: 'lollipop' | Extract<MarkDef, {
|
|
4815
5158
|
type: 'lollipop';
|
|
4816
|
-
}
|
|
5159
|
+
}>;
|
|
4817
5160
|
encoding: LollipopEncoding<TData>;
|
|
4818
5161
|
}) | (BaseChartSpec<TData> & {
|
|
4819
|
-
mark: 'beeswarm' |
|
|
5162
|
+
mark: 'beeswarm' | Extract<MarkDef, {
|
|
4820
5163
|
type: 'beeswarm';
|
|
4821
|
-
}
|
|
5164
|
+
}>;
|
|
4822
5165
|
encoding: BeeswarmEncoding<TData>;
|
|
4823
5166
|
}) | (BaseChartSpec<TData> & {
|
|
4824
|
-
mark: 'range' |
|
|
5167
|
+
mark: 'range' | Extract<MarkDef, {
|
|
4825
5168
|
type: 'range';
|
|
4826
|
-
}
|
|
5169
|
+
}>;
|
|
4827
5170
|
encoding: RangeEncoding<TData>;
|
|
4828
5171
|
}) | (BaseChartSpec<TData> & {
|
|
4829
|
-
mark: 'waffle' |
|
|
5172
|
+
mark: 'waffle' | Extract<MarkDef, {
|
|
4830
5173
|
type: 'waffle';
|
|
4831
|
-
}
|
|
5174
|
+
}>;
|
|
4832
5175
|
encoding: WaffleEncoding<TData>;
|
|
4833
5176
|
}) | (BaseChartSpec<TData> & {
|
|
4834
|
-
mark: 'text' |
|
|
5177
|
+
mark: 'text' | Extract<MarkDef, {
|
|
4835
5178
|
type: 'text';
|
|
4836
|
-
}
|
|
5179
|
+
}>;
|
|
4837
5180
|
encoding: TextEncoding<TData>;
|
|
4838
5181
|
}) | (BaseChartSpec<TData> & {
|
|
4839
|
-
mark: 'tick' |
|
|
5182
|
+
mark: 'tick' | Extract<MarkDef, {
|
|
4840
5183
|
type: 'tick';
|
|
4841
|
-
}
|
|
5184
|
+
}>;
|
|
4842
5185
|
encoding: TickEncoding<TData>;
|
|
4843
5186
|
}) | (BaseChartSpec<TData> & {
|
|
4844
|
-
mark: 'rect' |
|
|
5187
|
+
mark: 'rect' | Extract<MarkDef, {
|
|
4845
5188
|
type: 'rect';
|
|
4846
|
-
}
|
|
5189
|
+
}>;
|
|
4847
5190
|
encoding: RectEncoding<TData>;
|
|
4848
5191
|
}) | (BaseChartSpec<TData> & {
|
|
4849
|
-
mark: 'rule' |
|
|
5192
|
+
mark: 'rule' | Extract<MarkDef, {
|
|
4850
5193
|
type: 'rule';
|
|
4851
|
-
}
|
|
5194
|
+
}>;
|
|
4852
5195
|
encoding: Encoding<TData>;
|
|
4853
5196
|
}) | (BaseChartSpec<TData> & {
|
|
4854
|
-
mark: 'calendar' |
|
|
5197
|
+
mark: 'calendar' | Extract<MarkDef, {
|
|
4855
5198
|
type: 'calendar';
|
|
4856
|
-
}
|
|
5199
|
+
}>;
|
|
4857
5200
|
encoding: CalendarEncoding<TData>;
|
|
4858
5201
|
}) | (BaseChartSpec<TData> & {
|
|
4859
|
-
mark: 'parliament' |
|
|
5202
|
+
mark: 'parliament' | Extract<MarkDef, {
|
|
4860
5203
|
type: 'parliament';
|
|
4861
|
-
}
|
|
5204
|
+
}>;
|
|
4862
5205
|
encoding: ParliamentEncoding<TData>;
|
|
4863
5206
|
}) | (BaseChartSpec<TData> & {
|
|
4864
|
-
mark: 'histogram' |
|
|
5207
|
+
mark: 'histogram' | Extract<MarkDef, {
|
|
4865
5208
|
type: 'histogram';
|
|
4866
|
-
}
|
|
5209
|
+
}>;
|
|
4867
5210
|
encoding: HistogramEncoding<TData>;
|
|
4868
5211
|
}) | (BaseChartSpec<TData> & {
|
|
4869
|
-
mark: 'density' |
|
|
5212
|
+
mark: 'density' | Extract<MarkDef, {
|
|
4870
5213
|
type: 'density';
|
|
4871
|
-
}
|
|
5214
|
+
}>;
|
|
4872
5215
|
encoding: DensityEncoding<TData>;
|
|
4873
5216
|
});
|
|
4874
5217
|
/** Row density for tables. Maps to 40 / 48 / 56px row heights. */
|
|
@@ -4896,9 +5239,6 @@ interface TableSpec {
|
|
|
4896
5239
|
chrome?: Chrome;
|
|
4897
5240
|
/** Theme configuration overrides. */
|
|
4898
5241
|
theme?: ThemeConfig;
|
|
4899
|
-
/** Dark mode behavior. */
|
|
4900
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
4901
|
-
darkMode?: DarkMode;
|
|
4902
5242
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
4903
5243
|
watermark?: boolean;
|
|
4904
5244
|
/** Enable client-side search/filter. */
|
|
@@ -4927,10 +5267,6 @@ interface TableSpec {
|
|
|
4927
5267
|
totalRow?: boolean | {
|
|
4928
5268
|
label?: string;
|
|
4929
5269
|
};
|
|
4930
|
-
/**
|
|
4931
|
-
* @deprecated Use `density: 'condensed'`. Still honored, with a warning.
|
|
4932
|
-
*/
|
|
4933
|
-
compact?: boolean;
|
|
4934
5270
|
/** Whether the table adapts to container width. Defaults to true. */
|
|
4935
5271
|
responsive?: boolean;
|
|
4936
5272
|
/** Animation configuration for entrance animations. */
|
|
@@ -5068,9 +5404,6 @@ interface GraphSpec {
|
|
|
5068
5404
|
annotations?: Annotation[];
|
|
5069
5405
|
/** Theme configuration overrides. */
|
|
5070
5406
|
theme?: ThemeConfig;
|
|
5071
|
-
/** Dark mode behavior. */
|
|
5072
|
-
/** @deprecated Use the mount darkMode option; the spec field has no effect. */
|
|
5073
|
-
darkMode?: DarkMode;
|
|
5074
5407
|
/**
|
|
5075
5408
|
* Motion configuration. DEFAULT-ON: omit for full defaults, `false` to opt
|
|
5076
5409
|
* out of choreography (layout warmup still applies).
|
|
@@ -5193,13 +5526,16 @@ interface LayerSpec<TData extends DataRow = DataRow> {
|
|
|
5193
5526
|
labels?: LabelSpec;
|
|
5194
5527
|
/** Legend display configuration. */
|
|
5195
5528
|
legend?: LegendConfig;
|
|
5196
|
-
/**
|
|
5197
|
-
|
|
5529
|
+
/**
|
|
5530
|
+
* Responsive behavior for the composed chart, with the same meaning as
|
|
5531
|
+
* `ChartSpec.responsive`: `true`/`false` enables/disables container-width
|
|
5532
|
+
* adaptation, and a `ResponsiveConfig` object gives fine-grained control
|
|
5533
|
+
* (e.g. `{ compactAnnotationLimit: null }`). When omitted, the first leaf
|
|
5534
|
+
* layer's `responsive` applies.
|
|
5535
|
+
*/
|
|
5536
|
+
responsive?: boolean | ResponsiveConfig;
|
|
5198
5537
|
/** Theme configuration overrides. */
|
|
5199
5538
|
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
5539
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5204
5540
|
watermark?: boolean;
|
|
5205
5541
|
/** Resolution strategy for shared scales/axes/legends. */
|
|
@@ -5285,23 +5621,10 @@ interface SankeySpec {
|
|
|
5285
5621
|
legend?: LegendConfig;
|
|
5286
5622
|
/** Theme configuration overrides. */
|
|
5287
5623
|
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
5624
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5292
5625
|
watermark?: boolean;
|
|
5293
5626
|
/** Animation configuration for entrance animations. */
|
|
5294
5627
|
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
5628
|
}
|
|
5306
5629
|
/** Encoding channels specific to tile map visualizations. */
|
|
5307
5630
|
interface TileMapEncoding {
|
|
@@ -5350,9 +5673,6 @@ interface TileMapSpec {
|
|
|
5350
5673
|
legend?: LegendConfig;
|
|
5351
5674
|
/** Theme configuration overrides. */
|
|
5352
5675
|
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
5676
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5357
5677
|
watermark?: boolean;
|
|
5358
5678
|
/** Animation configuration for entrance animations. */
|
|
@@ -5397,6 +5717,14 @@ interface GeoMapZoomConfig {
|
|
|
5397
5717
|
}
|
|
5398
5718
|
/** Geo configuration for map specs. */
|
|
5399
5719
|
interface GeoMapGeo {
|
|
5720
|
+
/** Primary topology object; omission retains first-object behavior. */
|
|
5721
|
+
objectKey?: string;
|
|
5722
|
+
/** Fit against this primary-topology object, independent of contextual detail. */
|
|
5723
|
+
fitObjectKey?: string;
|
|
5724
|
+
/** Named assertion of the decoded coordinate plane for identity detail. */
|
|
5725
|
+
sourcePlane?: string;
|
|
5726
|
+
detailLayers?: GeoDetailLayer[];
|
|
5727
|
+
insets?: GeoInset[];
|
|
5400
5728
|
/** TopoJSON topology object. User imports this from us-atlas, world-atlas, or their own source. */
|
|
5401
5729
|
features: unknown;
|
|
5402
5730
|
/** Field in the TopoJSON feature properties to use as the join key. Defaults to 'id'. */
|
|
@@ -5426,12 +5754,47 @@ interface GeoMapGeo {
|
|
|
5426
5754
|
*/
|
|
5427
5755
|
zoom?: boolean | GeoMapZoomConfig;
|
|
5428
5756
|
}
|
|
5757
|
+
/** Explicit map anchor; feature and point identities occupy separate namespaces. */
|
|
5758
|
+
type GeoAnchor = ({
|
|
5759
|
+
kind: 'feature';
|
|
5760
|
+
id: string | number;
|
|
5761
|
+
} | {
|
|
5762
|
+
kind: 'point';
|
|
5763
|
+
id: string | number;
|
|
5764
|
+
} | {
|
|
5765
|
+
kind: 'coordinate';
|
|
5766
|
+
space: 'geographic' | 'source';
|
|
5767
|
+
x: number;
|
|
5768
|
+
y: number;
|
|
5769
|
+
}) & {
|
|
5770
|
+
viewId?: string;
|
|
5771
|
+
layerId?: string;
|
|
5772
|
+
};
|
|
5773
|
+
/** Static authored geographic explanation; plain text, without chart editing semantics. */
|
|
5774
|
+
interface GeoCallout {
|
|
5775
|
+
id: string;
|
|
5776
|
+
anchor: GeoAnchor;
|
|
5777
|
+
text: string;
|
|
5778
|
+
subtitle?: string;
|
|
5779
|
+
priority?: number;
|
|
5780
|
+
minZoom?: number;
|
|
5781
|
+
maxZoom?: number;
|
|
5782
|
+
offset?: {
|
|
5783
|
+
dx: number;
|
|
5784
|
+
dy: number;
|
|
5785
|
+
};
|
|
5786
|
+
maxWidth?: number;
|
|
5787
|
+
}
|
|
5429
5788
|
/** Encoding channels specific to map visualizations. */
|
|
5430
5789
|
interface GeoMapEncoding {
|
|
5431
5790
|
/** Join key field in the data. Required for choropleth; optional in basemap-only mode (points layer with empty data). */
|
|
5432
5791
|
key?: EncodingChannel;
|
|
5433
5792
|
/** Color encoding (quantitative or nominal). Drives fill color of features. Optional when a points layer is present (basemap-only mode). */
|
|
5434
5793
|
color?: EncodingChannel;
|
|
5794
|
+
/** Explicit feature label field, read from its joined row or same-named topology property. */
|
|
5795
|
+
text?: EncodingChannel;
|
|
5796
|
+
/** Higher finite quantitative values win label placement priority. Requires text. */
|
|
5797
|
+
textPriority?: EncodingChannel;
|
|
5435
5798
|
/** Tooltip encoding (optional). */
|
|
5436
5799
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5437
5800
|
}
|
|
@@ -5443,10 +5806,14 @@ interface GeoMapPointsLayer {
|
|
|
5443
5806
|
longitude: EncodingChannel;
|
|
5444
5807
|
/** Field holding latitude (y coordinate). */
|
|
5445
5808
|
latitude: EncodingChannel;
|
|
5446
|
-
/** Optional quantitative size encoding. Area-proportional: r proportional to sqrt(value).
|
|
5809
|
+
/** Optional quantitative size encoding. Area-proportional: r proportional to sqrt(value). A proportional size key explains the resolved radius scale. */
|
|
5447
5810
|
size?: EncodingChannel;
|
|
5448
5811
|
/** Optional color encoding (nominal or quantitative). Independent scale from choropleth. */
|
|
5449
5812
|
color?: EncodingChannel;
|
|
5813
|
+
/** Explicit point label field. Requires a unique points.key. */
|
|
5814
|
+
text?: EncodingChannel;
|
|
5815
|
+
/** Quantitative label priority; defaults to the point size value. Requires text. */
|
|
5816
|
+
textPriority?: EncodingChannel;
|
|
5450
5817
|
/** Tooltip channel(s), same shape as GeoMapEncoding.tooltip. */
|
|
5451
5818
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5452
5819
|
/** Stable id for event callbacks, and the key used to match points across
|
|
@@ -5468,24 +5835,23 @@ interface GeoMapSpec {
|
|
|
5468
5835
|
encoding: GeoMapEncoding;
|
|
5469
5836
|
/** Editorial chrome (title, subtitle, source, byline, footer). */
|
|
5470
5837
|
chrome?: Chrome;
|
|
5838
|
+
/** Optional static distribution and reader active-value presentation. Both default to false. */
|
|
5839
|
+
colorKey?: {
|
|
5840
|
+
activeValue?: boolean;
|
|
5841
|
+
distribution?: boolean;
|
|
5842
|
+
};
|
|
5471
5843
|
/** Legend display configuration. */
|
|
5472
5844
|
legend?: LegendConfig;
|
|
5473
5845
|
/** Theme configuration overrides. */
|
|
5474
5846
|
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
5847
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5479
5848
|
watermark?: boolean;
|
|
5480
5849
|
/** Optional point/symbol layer rendered above choropleth features. */
|
|
5481
5850
|
points?: GeoMapPointsLayer;
|
|
5851
|
+
/** Authored labels with explicit feature, point, or coordinate anchors. */
|
|
5852
|
+
callouts?: GeoCallout[];
|
|
5482
5853
|
/** Animation configuration for entrance animations. */
|
|
5483
5854
|
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
5855
|
}
|
|
5490
5856
|
interface BarListSpec {
|
|
5491
5857
|
/** Discriminant: always "barlist". */
|
|
@@ -5507,20 +5873,10 @@ interface BarListSpec {
|
|
|
5507
5873
|
chrome?: Chrome;
|
|
5508
5874
|
/** Theme configuration overrides. */
|
|
5509
5875
|
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
5876
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5514
5877
|
watermark?: boolean;
|
|
5515
5878
|
/** Animation configuration for entrance animations. */
|
|
5516
5879
|
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
5880
|
}
|
|
5525
5881
|
/** Encoding channels for a barlist visualization. */
|
|
5526
5882
|
interface BarListEncoding {
|
|
@@ -5860,11 +6216,7 @@ declare function isGeoMapSpec(spec: VizSpec | Record<string, unknown>): spec is
|
|
|
5860
6216
|
declare function isTextAnnotation(annotation: Annotation): annotation is TextAnnotation;
|
|
5861
6217
|
/** Check if an annotation is a RangeAnnotation. */
|
|
5862
6218
|
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
|
-
*/
|
|
6219
|
+
/** Check if an annotation is a RefLineAnnotation. */
|
|
5868
6220
|
declare function isRefLineAnnotation(annotation: Annotation): annotation is RefLineAnnotation;
|
|
5869
6221
|
/** Human-readable display names for mark types (used in alt text, error messages). */
|
|
5870
6222
|
declare const MARK_DISPLAY_NAMES: Record<MarkType, string>;
|
|
@@ -5885,7 +6237,7 @@ interface EditOp {
|
|
|
5885
6237
|
op: 'set' | 'remove' | 'add';
|
|
5886
6238
|
path: string;
|
|
5887
6239
|
value?: unknown;
|
|
5888
|
-
/** Preconditions on the nearest authored annotation ancestor. */
|
|
6240
|
+
/** Preconditions on the nearest authored annotation ancestor. `text` matches a refline/range `label`. */
|
|
5889
6241
|
expect?: {
|
|
5890
6242
|
id?: string;
|
|
5891
6243
|
type?: string;
|
|
@@ -5909,29 +6261,24 @@ type ElementRef = {
|
|
|
5909
6261
|
type: 'annotation';
|
|
5910
6262
|
index: number;
|
|
5911
6263
|
id?: string;
|
|
5912
|
-
/** RFC 6901 JSON Pointer to the
|
|
6264
|
+
/** 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
6265
|
path?: string;
|
|
5914
6266
|
/** Rendered facet instance; source identity remains index/id/path. */
|
|
5915
6267
|
facetInstance?: string;
|
|
5916
6268
|
} | {
|
|
5917
6269
|
type: 'chrome';
|
|
5918
6270
|
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. */
|
|
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`. */
|
|
5925
6272
|
path?: string;
|
|
5926
6273
|
} | {
|
|
5927
6274
|
type: 'legend';
|
|
5928
|
-
/** RFC 6901 JSON Pointer to the
|
|
6275
|
+
/** 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
6276
|
path?: string;
|
|
5930
6277
|
} | {
|
|
5931
6278
|
type: 'legend-entry';
|
|
5932
6279
|
series: string;
|
|
5933
6280
|
index: number;
|
|
5934
|
-
/** RFC 6901 JSON Pointer to the
|
|
6281
|
+
/** 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
6282
|
path?: string;
|
|
5936
6283
|
};
|
|
5937
6284
|
/** Helper constructors for ergonomic ElementRef creation. */
|
|
@@ -5940,88 +6287,9 @@ declare const elementRef: {
|
|
|
5940
6287
|
type: "annotation";
|
|
5941
6288
|
}>;
|
|
5942
6289
|
readonly chrome: (key: ChromeKey, path?: string) => ElementRef;
|
|
5943
|
-
readonly seriesLabel: (series: string, path?: string) => ElementRef;
|
|
5944
6290
|
readonly legend: (path?: string) => ElementRef;
|
|
5945
6291
|
readonly legendEntry: (series: string, index: number, path?: string) => ElementRef;
|
|
5946
6292
|
};
|
|
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
6293
|
/**
|
|
6026
6294
|
* Event fired when a user interacts with a data mark (bar, point, line segment, etc.).
|
|
6027
6295
|
*
|
|
@@ -6048,14 +6316,6 @@ interface MarkEvent {
|
|
|
6048
6316
|
* or ChartProps (React component) to receive interaction callbacks.
|
|
6049
6317
|
*/
|
|
6050
6318
|
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
6319
|
/** Called when a data mark is clicked. */
|
|
6060
6320
|
onMarkClick?: (event: MarkEvent) => void;
|
|
6061
6321
|
/** Called when the mouse enters a data mark. */
|
|
@@ -6072,20 +6332,14 @@ interface ChartEventHandlers {
|
|
|
6072
6332
|
onHighlightChange?: (values: string[]) => void;
|
|
6073
6333
|
/** Called when an annotation element is clicked. */
|
|
6074
6334
|
onAnnotationClick?: (annotation: Annotation, event: MouseEvent, element: ElementRef) => void;
|
|
6075
|
-
/** @deprecated Use onEditTransaction to persist complete edits. */
|
|
6076
|
-
onAnnotationEdit?: (annotation: TextAnnotation, updatedOffset: AnnotationOffset) => void;
|
|
6077
6335
|
/** Unified edit callback. Fires for any spec-modifying edit (repositioning, deletion, text editing). */
|
|
6078
|
-
onEdit?: (
|
|
6336
|
+
onEdit?: (transaction: EditTransaction) => void;
|
|
6079
6337
|
/** Optional source revision, stamped on emitted transactions. */
|
|
6080
6338
|
revision?: string | number;
|
|
6081
|
-
/** Durable authored edits, applied atomically with applyEditTransaction. */
|
|
6082
|
-
onEditTransaction?: (transaction: EditTransaction) => void;
|
|
6083
6339
|
/** Fired when an element is selected via click or programmatic select(). */
|
|
6084
6340
|
onSelect?: (element: ElementRef) => void;
|
|
6085
6341
|
/** Fired when the current element is deselected (click empty, Escape, or new selection replaces old). */
|
|
6086
6342
|
onDeselect?: (element: ElementRef) => void;
|
|
6087
|
-
/** @deprecated Use onEditTransaction with a text set operation. */
|
|
6088
|
-
onTextEdit?: (element: ElementRef, oldText: string, newText: string) => void;
|
|
6089
6343
|
/**
|
|
6090
6344
|
* Fired when a "you draw it" (`youDrawIt`) drawing is revealed (button click
|
|
6091
6345
|
* or programmatic reveal), with the reader's guess in data coordinates,
|
|
@@ -6116,6 +6370,11 @@ type EditTransactionResult<T> = {
|
|
|
6116
6370
|
*/
|
|
6117
6371
|
declare function applyEditTransaction<T>(spec: T, tx: EditTransaction): EditTransactionResult<T>;
|
|
6118
6372
|
|
|
6373
|
+
/** Escape one RFC 6901 reference token: `~` becomes `~0`, then `/` becomes `~1`. */
|
|
6374
|
+
declare function encodePointerToken(token: string | number): string;
|
|
6375
|
+
/** Build a root-relative JSON Pointer from unescaped tokens. No tokens is the root, `''`. */
|
|
6376
|
+
declare function jsonPointer(...tokens: ReadonlyArray<string | number>): string;
|
|
6377
|
+
|
|
6119
6378
|
/**
|
|
6120
6379
|
* Per-mark-type encoding validation rules.
|
|
6121
6380
|
*
|
|
@@ -6189,6 +6448,115 @@ interface GraphChannelRule {
|
|
|
6189
6448
|
*/
|
|
6190
6449
|
declare const GRAPH_ENCODING_RULES: Record<string, GraphChannelRule>;
|
|
6191
6450
|
|
|
6451
|
+
interface GeoEntityRef {
|
|
6452
|
+
kind: 'feature' | 'point';
|
|
6453
|
+
id: string | number;
|
|
6454
|
+
canonicalId: string;
|
|
6455
|
+
}
|
|
6456
|
+
interface GeoReaderObservation {
|
|
6457
|
+
entity: GeoEntityRef;
|
|
6458
|
+
observation: string;
|
|
6459
|
+
persistent: boolean;
|
|
6460
|
+
datum: DataRow | null;
|
|
6461
|
+
previous?: DataRow | null;
|
|
6462
|
+
state: 'visible' | 'filtered';
|
|
6463
|
+
}
|
|
6464
|
+
interface GeoReaderSelection {
|
|
6465
|
+
preview: GeoReaderObservation | null;
|
|
6466
|
+
pinned: GeoReaderObservation[];
|
|
6467
|
+
announcement: string;
|
|
6468
|
+
}
|
|
6469
|
+
|
|
6470
|
+
type ReaderDomainValue = {
|
|
6471
|
+
kind: 'string';
|
|
6472
|
+
value: string;
|
|
6473
|
+
} | {
|
|
6474
|
+
kind: 'number';
|
|
6475
|
+
value: number;
|
|
6476
|
+
} | {
|
|
6477
|
+
kind: 'boolean';
|
|
6478
|
+
value: boolean;
|
|
6479
|
+
} | {
|
|
6480
|
+
kind: 'date';
|
|
6481
|
+
value: string;
|
|
6482
|
+
};
|
|
6483
|
+
interface ReaderBindingScope {
|
|
6484
|
+
dataset: string;
|
|
6485
|
+
transform: string;
|
|
6486
|
+
grouping: string[];
|
|
6487
|
+
xField: string;
|
|
6488
|
+
valueField: string;
|
|
6489
|
+
}
|
|
6490
|
+
interface ReaderPanelScope {
|
|
6491
|
+
id: string;
|
|
6492
|
+
facet?: {
|
|
6493
|
+
field: string;
|
|
6494
|
+
values: ReaderDomainValue[];
|
|
6495
|
+
};
|
|
6496
|
+
}
|
|
6497
|
+
interface ReaderSeries {
|
|
6498
|
+
key: string;
|
|
6499
|
+
label: string;
|
|
6500
|
+
color?: string;
|
|
6501
|
+
valueField: string;
|
|
6502
|
+
metadata?: FieldMetadata;
|
|
6503
|
+
}
|
|
6504
|
+
interface ReaderSliceMember {
|
|
6505
|
+
series: ReaderSeries;
|
|
6506
|
+
status: 'observed' | 'no-observation' | 'ambiguous';
|
|
6507
|
+
observations: ReaderObservation[];
|
|
6508
|
+
value?: number;
|
|
6509
|
+
valueStatus?: 'finite' | 'missing' | 'invalid';
|
|
6510
|
+
formattedValue?: string;
|
|
6511
|
+
}
|
|
6512
|
+
interface ReaderSlice {
|
|
6513
|
+
kind: 'slice';
|
|
6514
|
+
key: string;
|
|
6515
|
+
binding: ReaderBindingScope;
|
|
6516
|
+
panel: ReaderPanelScope;
|
|
6517
|
+
x: ReaderDomainValue;
|
|
6518
|
+
xLabel: string;
|
|
6519
|
+
revision: string;
|
|
6520
|
+
members: ReaderSliceMember[];
|
|
6521
|
+
persistent: boolean;
|
|
6522
|
+
state: 'visible' | 'filtered';
|
|
6523
|
+
}
|
|
6524
|
+
interface ReaderSliceSelection {
|
|
6525
|
+
kind: 'slices';
|
|
6526
|
+
preview: ReaderSlice | null;
|
|
6527
|
+
pinned: ReaderSlice[];
|
|
6528
|
+
announcement: string;
|
|
6529
|
+
}
|
|
6530
|
+
interface ReaderChangeMeta {
|
|
6531
|
+
reason: 'user' | 'data' | 'filter' | 'programmatic';
|
|
6532
|
+
}
|
|
6533
|
+
interface ReaderComparisonScope {
|
|
6534
|
+
dataset: string;
|
|
6535
|
+
transform: string;
|
|
6536
|
+
grouping: string[];
|
|
6537
|
+
panelId: string;
|
|
6538
|
+
}
|
|
6539
|
+
interface ReaderComparisonOperand {
|
|
6540
|
+
value: number;
|
|
6541
|
+
metadata?: FieldMetadata;
|
|
6542
|
+
binding: ReaderComparisonScope;
|
|
6543
|
+
}
|
|
6544
|
+
type ReaderComparisonResult = {
|
|
6545
|
+
status: 'comparable';
|
|
6546
|
+
absolute: number;
|
|
6547
|
+
relative?: number;
|
|
6548
|
+
unit: string;
|
|
6549
|
+
relativeUnavailable?: 'zero-baseline' | 'negative-baseline';
|
|
6550
|
+
} | {
|
|
6551
|
+
status: 'unavailable';
|
|
6552
|
+
reason: 'nonfinite' | 'missing-metadata' | 'incompatible-metadata' | 'incompatible-binding';
|
|
6553
|
+
message: string;
|
|
6554
|
+
};
|
|
6555
|
+
interface ReaderSliceIndexOptions {
|
|
6556
|
+
revision: string;
|
|
6557
|
+
binding?: DatasetBinding;
|
|
6558
|
+
}
|
|
6559
|
+
|
|
6192
6560
|
/**
|
|
6193
6561
|
* Color blindness simulation and palette distinguishability checks.
|
|
6194
6562
|
*
|
|
@@ -6423,7 +6791,7 @@ declare function adaptForLightLineStroke(color: string): string;
|
|
|
6423
6791
|
*/
|
|
6424
6792
|
declare const DEFAULT_THEME: ThemeBase;
|
|
6425
6793
|
|
|
6426
|
-
/**
|
|
6794
|
+
/** Deep-merge authored theme layers. Later layers win at each authored leaf. */
|
|
6427
6795
|
declare function mergeThemeConfig(base: ThemeConfig | undefined, override: ThemeConfig | undefined): ThemeConfig | undefined;
|
|
6428
6796
|
|
|
6429
6797
|
/**
|
|
@@ -6434,8 +6802,6 @@ declare function mergeThemeConfig(base: ThemeConfig | undefined, override: Theme
|
|
|
6434
6802
|
* onto DEFAULT_THEME, so only the deltas are specified here.
|
|
6435
6803
|
*/
|
|
6436
6804
|
|
|
6437
|
-
/** Editorial preset: the current default look. Exported for explicit selection. */
|
|
6438
|
-
declare const editorial: ThemeConfig;
|
|
6439
6805
|
/** Essay preset: serif display titles, warmer background, generous spacing. */
|
|
6440
6806
|
declare const essay: ThemeConfig;
|
|
6441
6807
|
/** Wire preset: dense, mono numerals, tighter chrome. Dashboard/agency feel. */
|
|
@@ -6466,7 +6832,7 @@ declare const broadsheet: ThemeConfig;
|
|
|
6466
6832
|
* siblings, the register a monitoring UI wants.
|
|
6467
6833
|
*/
|
|
6468
6834
|
declare const terminal: ThemeConfig;
|
|
6469
|
-
/**
|
|
6835
|
+
/** @deprecated v9 adopts clarity typography by default. Set its remaining colors explicitly; removed in v10. */
|
|
6470
6836
|
declare const clarity: ThemeConfig;
|
|
6471
6837
|
/** Documented v8 typography. This does not freeze the layout engine. */
|
|
6472
6838
|
declare const legacyEditorial: ThemeConfig;
|
|
@@ -6521,10 +6887,6 @@ declare function resolveTheme(userTheme?: ThemeConfig, base?: ThemeBase): Resolv
|
|
|
6521
6887
|
declare const FOOTNOTE_LINE_HEIGHT = 1.3;
|
|
6522
6888
|
/** Internal compiler arithmetic and compatibility fallback for hand-built layouts. */
|
|
6523
6889
|
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
6890
|
/**
|
|
6529
6891
|
* Compute resolved chrome layout from a Chrome spec and resolved theme.
|
|
6530
6892
|
*
|
|
@@ -6700,14 +7062,10 @@ declare function axisTitleOffset(maxTickLabelWidth: number, titleFontSize: numbe
|
|
|
6700
7062
|
declare const NARROW_VIEWPORT_MAX = 500;
|
|
6701
7063
|
/** Extra top padding added below NARROW_VIEWPORT_MAX to clear iOS Safari browser chrome. */
|
|
6702
7064
|
declare const TOP_PAD_EXTRA_NARROW = 10;
|
|
6703
|
-
/** @deprecated Use NARROW_VIEWPORT_MAX instead. */
|
|
6704
|
-
declare const TOP_PAD_NARROW_MAX = 500;
|
|
6705
7065
|
/** Gap between category label text and chart edge on narrow viewports (< NARROW_VIEWPORT_MAX). */
|
|
6706
7066
|
declare const LABEL_GAP_COMPACT = 8;
|
|
6707
7067
|
/** Gap between category label text and chart edge on standard viewports. */
|
|
6708
7068
|
declare const LABEL_GAP_DEFAULT = 12;
|
|
6709
|
-
/** @deprecated Use NARROW_VIEWPORT_MAX instead. */
|
|
6710
|
-
declare const LABEL_GAP_NARROW_MAX = 500;
|
|
6711
7069
|
/**
|
|
6712
7070
|
* Width threshold for the medium left-label fraction cap.
|
|
6713
7071
|
* Sits between medium (400-700) and full (> 700) to prevent wide category labels
|
|
@@ -7020,8 +7378,6 @@ interface ChartBuilderOptions {
|
|
|
7020
7378
|
responsive?: boolean;
|
|
7021
7379
|
/** Theme configuration overrides. */
|
|
7022
7380
|
theme?: ThemeConfig;
|
|
7023
|
-
/** @deprecated Set darkMode on the mount instead; this option has no effect. */
|
|
7024
|
-
darkMode?: DarkMode;
|
|
7025
7381
|
}
|
|
7026
7382
|
/** Options for the dataTable builder. */
|
|
7027
7383
|
interface TableBuilderOptions {
|
|
@@ -7033,8 +7389,6 @@ interface TableBuilderOptions {
|
|
|
7033
7389
|
chrome?: Chrome;
|
|
7034
7390
|
/** Theme configuration overrides. */
|
|
7035
7391
|
theme?: ThemeConfig;
|
|
7036
|
-
/** @deprecated Set darkMode on the mount instead; this option has no effect. */
|
|
7037
|
-
darkMode?: DarkMode;
|
|
7038
7392
|
/** Enable client-side search/filter. */
|
|
7039
7393
|
search?: boolean;
|
|
7040
7394
|
/** Pagination configuration. */
|
|
@@ -7045,18 +7399,15 @@ interface TableBuilderOptions {
|
|
|
7045
7399
|
stickyFirstColumn?: boolean;
|
|
7046
7400
|
/** Row density. */
|
|
7047
7401
|
density?: TableDensity;
|
|
7048
|
-
/** @deprecated Use density. */
|
|
7049
|
-
compact?: boolean;
|
|
7050
7402
|
/** Whether the table adapts to container width. */
|
|
7051
7403
|
responsive?: boolean;
|
|
7052
7404
|
}
|
|
7053
7405
|
/**
|
|
7054
7406
|
* Infer the encoding field type from data values.
|
|
7055
7407
|
*
|
|
7056
|
-
* Samples
|
|
7057
|
-
*
|
|
7058
|
-
*
|
|
7059
|
-
* - Otherwise returns "nominal".
|
|
7408
|
+
* Samples 50 rows, ignoring nulls; more than 80% numeric or temporal values
|
|
7409
|
+
* establish a type. Numeric strings (including ISO years) are quantitative.
|
|
7410
|
+
* Strings count as temporal only when date-shaped and parseable.
|
|
7060
7411
|
*/
|
|
7061
7412
|
declare function inferFieldType(data: DataRow[], field: string): FieldType;
|
|
7062
7413
|
/**
|
|
@@ -7166,8 +7517,6 @@ interface TileMapBuilderOptions {
|
|
|
7166
7517
|
legend?: LegendConfig;
|
|
7167
7518
|
/** Theme overrides. */
|
|
7168
7519
|
theme?: ThemeConfig;
|
|
7169
|
-
/** @deprecated Set darkMode on the mount instead; this option has no effect. */
|
|
7170
|
-
darkMode?: DarkMode;
|
|
7171
7520
|
/** Whether to show the watermark. */
|
|
7172
7521
|
watermark?: boolean;
|
|
7173
7522
|
/** Animation configuration. */
|
|
@@ -7255,4 +7604,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
|
|
|
7255
7604
|
declare const CSS_TOKENS: readonly CssTokenDef[];
|
|
7256
7605
|
declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
|
|
7257
7606
|
|
|
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
|
|
7607
|
+
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 };
|