ggaction 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +3 -2
  3. package/knowledge/action-card.schema.json +1 -1
  4. package/knowledge/action-cards.json +1 -1
  5. package/knowledge/intent-taxonomy.json +1 -1
  6. package/knowledge/mcp-resources.json +1 -1
  7. package/knowledge/task-resolver.js +1 -1
  8. package/package.json +10 -4
  9. package/src/BasicChartProgram.js +1 -1
  10. package/src/accessibility.js +3 -2
  11. package/src/actions/boxPlots/create.js +14 -4
  12. package/src/actions/boxPlots/edit.js +39 -33
  13. package/src/actions/boxPlots/materialize.js +7 -3
  14. package/src/actions/boxPlots/options.js +37 -11
  15. package/src/actions/canvas/actions.js +70 -95
  16. package/src/actions/canvas/fitting.js +16 -1
  17. package/src/actions/canvas/index.js +3 -0
  18. package/src/actions/canvas/plotBorder.js +28 -0
  19. package/src/actions/charts/area.js +2 -2
  20. package/src/actions/charts/bar.js +34 -7
  21. package/src/actions/charts/ecdf.js +4 -18
  22. package/src/actions/charts/endpoints.js +4 -18
  23. package/src/actions/charts/heatmap.js +4 -4
  24. package/src/actions/charts/index.js +2 -0
  25. package/src/actions/charts/interval-regression.js +2 -2
  26. package/src/actions/charts/line.js +1 -1
  27. package/src/actions/charts/pie.js +3 -47
  28. package/src/actions/charts/radial.js +34 -12
  29. package/src/actions/charts/scatter.js +16 -2
  30. package/src/actions/charts/shared.js +2 -2
  31. package/src/actions/charts/text.js +35 -0
  32. package/src/actions/composition/actions.js +6 -2
  33. package/src/actions/data/bin.js +1 -1
  34. package/src/actions/data/box.js +2 -1
  35. package/src/actions/data/create.js +18 -5
  36. package/src/actions/data/density.js +1 -1
  37. package/src/actions/data/derived.js +15 -1
  38. package/src/actions/data/edit.js +20 -7
  39. package/src/actions/data/filter.js +15 -4
  40. package/src/actions/data/index.js +3 -0
  41. package/src/actions/data/interval.js +2 -0
  42. package/src/actions/data/regression.js +6 -2
  43. package/src/actions/data/revise.js +37 -5
  44. package/src/actions/data/shared.js +33 -4
  45. package/src/actions/data/sort.js +21 -0
  46. package/src/actions/data/stack.js +3 -1
  47. package/src/actions/data/summary.js +1 -1
  48. package/src/actions/encodings/angle.js +4 -1
  49. package/src/actions/encodings/appearance.js +43 -31
  50. package/src/actions/encodings/barWidth.js +36 -11
  51. package/src/actions/encodings/channels.js +0 -1
  52. package/src/actions/encodings/color/continuous.js +5 -2
  53. package/src/actions/encodings/color/index.js +5 -2
  54. package/src/actions/encodings/color/policy.js +10 -3
  55. package/src/actions/encodings/density/resolve.js +1 -6
  56. package/src/actions/encodings/offset.js +4 -1
  57. package/src/actions/encodings/position/policies/arc.js +12 -10
  58. package/src/actions/encodings/position/policies/area.js +3 -3
  59. package/src/actions/encodings/position/policies/bar.js +15 -6
  60. package/src/actions/encodings/position/policies/line.js +17 -6
  61. package/src/actions/encodings/position/resolve.js +9 -3
  62. package/src/actions/encodings/ranged.js +23 -1
  63. package/src/actions/encodings/remove.js +3 -2
  64. package/src/actions/encodings/ruleAppearance.js +4 -1
  65. package/src/actions/encodings/seriesLayout.js +1 -0
  66. package/src/actions/encodings/stroke.js +4 -1
  67. package/src/actions/encodings/strokeDash.js +6 -1
  68. package/src/actions/encodings/text.js +12 -4
  69. package/src/actions/errorBands/create.js +2 -2
  70. package/src/actions/errorBands/edit.js +2 -1
  71. package/src/actions/facets/actions.js +158 -240
  72. package/src/actions/gradientPlots/resolve.js +2 -17
  73. package/src/actions/guides/applicability.js +1 -1
  74. package/src/actions/guides/axes/axis.js +16 -4
  75. package/src/actions/guides/axes/edit.js +4 -4
  76. package/src/actions/guides/axes/labels.js +120 -46
  77. package/src/actions/guides/axes/lines.js +6 -5
  78. package/src/actions/guides/axes/parallel/lifecycle.js +1 -1
  79. package/src/actions/guides/axes/parallel/policy.js +8 -7
  80. package/src/actions/guides/axes/remove.js +3 -2
  81. package/src/actions/guides/axes/tickGroups.js +5 -2
  82. package/src/actions/guides/axes/ticks.js +6 -3
  83. package/src/actions/guides/axes/titles.js +71 -26
  84. package/src/actions/guides/basic.js +2 -0
  85. package/src/actions/guides/facadeLegend.js +10 -2
  86. package/src/actions/guides/grids/grid.js +7 -1
  87. package/src/actions/guides/grids/resolve.js +59 -12
  88. package/src/actions/guides/legends/blocks.js +3 -1
  89. package/src/actions/guides/legends/categorical/actions.js +70 -17
  90. package/src/actions/guides/legends/categorical/components.js +12 -8
  91. package/src/actions/guides/legends/categorical/index.js +6 -0
  92. package/src/actions/guides/legends/categorical/layout.js +37 -8
  93. package/src/actions/guides/legends/categorical/options.js +31 -20
  94. package/src/actions/guides/legends/categorical/resolve.js +2 -2
  95. package/src/actions/guides/legends/categorical/symbols.js +18 -12
  96. package/src/actions/guides/legends/categorical/validation.js +1 -6
  97. package/src/actions/guides/legends/continuous/colorSymbols.js +1 -0
  98. package/src/actions/guides/legends/continuous/common.js +1 -447
  99. package/src/actions/guides/legends/continuous/gradient.js +47 -34
  100. package/src/actions/guides/legends/continuous/interval.js +4 -4
  101. package/src/actions/guides/legends/continuous/opacity.js +19 -12
  102. package/src/actions/guides/legends/edit.js +1 -604
  103. package/src/actions/guides/legends/focused.js +2 -2
  104. package/src/actions/guides/legends/group.js +1 -0
  105. package/src/actions/guides/legends/lane.js +1 -516
  106. package/src/actions/guides/legends/remove.js +3 -0
  107. package/src/actions/guides/legends/sampling.js +1 -1
  108. package/src/actions/guides/legends/size.js +51 -43
  109. package/src/actions/guides/legends/strokeWidth.js +11 -29
  110. package/src/actions/guides/legends/target.js +3 -3
  111. package/src/actions/guides/legends/transition.js +21 -7
  112. package/src/actions/guides/polar/axes/labels.js +4 -2
  113. package/src/actions/guides/polar/axes/titles.js +7 -5
  114. package/src/actions/guides/polar/resolve.js +6 -14
  115. package/src/actions/index.js +16 -16
  116. package/src/actions/marks/arc/actions.js +3 -10
  117. package/src/actions/marks/area/actions.js +8 -5
  118. package/src/actions/marks/area/materialize.js +8 -9
  119. package/src/actions/marks/bar/create.js +17 -4
  120. package/src/actions/marks/bar/edit.js +18 -7
  121. package/src/actions/marks/bar/materialize.js +9 -6
  122. package/src/actions/marks/line/actions.js +11 -4
  123. package/src/actions/marks/line/materialize.js +9 -5
  124. package/src/actions/marks/point/create.js +8 -1
  125. package/src/actions/marks/point/edit.js +13 -6
  126. package/src/actions/marks/point/materialize.js +4 -2
  127. package/src/actions/marks/rect/actions.js +26 -11
  128. package/src/actions/marks/remove.js +2 -0
  129. package/src/actions/marks/rule/actions.js +31 -12
  130. package/src/actions/marks/text/actions.js +42 -11
  131. package/src/actions/marks/text/layout.js +3 -0
  132. package/src/actions/marks/tick/actions.js +23 -8
  133. package/src/actions/primitives/semanticAction.js +37 -3
  134. package/src/actions/primitives/semanticValidation/dataset.js +13 -1
  135. package/src/actions/primitives/semanticValidation/layer.js +26 -2
  136. package/src/actions/primitives/semanticValidation/scale.js +6 -0
  137. package/src/actions/regression/create.js +26 -5
  138. package/src/actions/regression/edit.js +50 -15
  139. package/src/actions/regression/follow.js +22 -0
  140. package/src/actions/regression/resolve.js +2 -6
  141. package/src/actions/scales/channels.js +20 -15
  142. package/src/actions/scales/consumers/common.js +2 -1
  143. package/src/actions/scales/consumers/families.js +16 -5
  144. package/src/actions/scales/create.js +10 -4
  145. package/src/actions/scales/definitions.js +1 -425
  146. package/src/actions/scales/edit.js +3 -3
  147. package/src/actions/scales/editPolicy.js +9 -3
  148. package/src/actions/scales/materialize.js +1 -1
  149. package/src/actions/scales/parallel.js +1 -1
  150. package/src/actions/scales/patch.js +1 -1
  151. package/src/actions/scales/preview.js +49 -2
  152. package/src/actions/scales/quantitativeColor.js +3 -3
  153. package/src/actions/selection/actions.js +1 -13
  154. package/src/actions/theme/reconcile.js +83 -27
  155. package/src/actions/theme/state.js +12 -0
  156. package/src/actions/titles/actions.js +5 -18
  157. package/src/actions/titles/resolve.js +41 -19
  158. package/src/actions/violinPlots/edit.js +3 -20
  159. package/src/core/action.js +3 -2
  160. package/src/core/compositionState.js +4 -1
  161. package/src/core/font.js +9 -2
  162. package/src/core/optionRequirements.js +1 -0
  163. package/src/core/programState.js +5 -1
  164. package/src/core/resourceReferences.js +3 -0
  165. package/src/core/textMetricProfile.js +3 -2
  166. package/src/core/textMetrics.js +41 -4
  167. package/src/core/validation.js +26 -0
  168. package/src/core/vocabulary.js +4 -0
  169. package/src/grammar/aggregate.js +4 -18
  170. package/src/grammar/arcs.js +1 -386
  171. package/src/grammar/areaPaint.js +10 -0
  172. package/src/grammar/areaSeries.js +18 -10
  173. package/src/grammar/bars/geometry.js +30 -3
  174. package/src/grammar/bars/policy.js +12 -1
  175. package/src/grammar/bin.js +41 -22
  176. package/src/grammar/bin2d.js +1 -6
  177. package/src/grammar/boxPlot.js +56 -9
  178. package/src/grammar/categoryOrder.js +1 -6
  179. package/src/grammar/complete.js +15 -19
  180. package/src/grammar/computed.js +92 -25
  181. package/src/grammar/curveCommands.js +29 -16
  182. package/src/grammar/datasetSchema.js +382 -0
  183. package/src/grammar/density.js +53 -5
  184. package/src/grammar/displayLabels.js +28 -0
  185. package/src/grammar/ecdf.js +2 -9
  186. package/src/grammar/facets/dependencies.js +6 -2
  187. package/src/grammar/facets/guides.js +5 -0
  188. package/src/grammar/facets/index.js +2 -5
  189. package/src/grammar/filter.js +133 -39
  190. package/src/grammar/fold.js +2 -12
  191. package/src/grammar/gradientProfile.js +1 -6
  192. package/src/grammar/impute.js +21 -48
  193. package/src/grammar/interval.js +34 -10
  194. package/src/grammar/itemMissing.js +59 -0
  195. package/src/grammar/legendGradient.js +18 -0
  196. package/src/grammar/legendGroups.js +1 -0
  197. package/src/grammar/legendTitleStyle.js +22 -0
  198. package/src/grammar/lineSeries.js +32 -17
  199. package/src/grammar/markLabels.js +5 -2
  200. package/src/grammar/normalize.js +4 -54
  201. package/src/grammar/numeric.js +1 -290
  202. package/src/grammar/parallelCoordinates.js +1 -6
  203. package/src/grammar/parseTime.js +41 -0
  204. package/src/grammar/pathCommands.js +11 -4
  205. package/src/grammar/polar.js +1 -184
  206. package/src/grammar/positionCompatibility.js +3 -3
  207. package/src/grammar/regression/derive.js +63 -16
  208. package/src/grammar/regression/index.js +1 -0
  209. package/src/grammar/regression/models.js +116 -59
  210. package/src/grammar/regression/parameters.js +69 -6
  211. package/src/grammar/roundedRect.js +42 -54
  212. package/src/grammar/scales/appearance.js +1 -206
  213. package/src/grammar/scales/color.js +1 -382
  214. package/src/grammar/scales/colorConsumers.js +5 -2
  215. package/src/grammar/scales/definition.js +1 -190
  216. package/src/grammar/scales/discretized.js +1 -195
  217. package/src/grammar/scales/size.js +1 -456
  218. package/src/grammar/scales/temporal.js +2 -13
  219. package/src/grammar/scales/transformed.js +1 -383
  220. package/src/grammar/scales/types.js +1 -1
  221. package/src/grammar/scales/validation.js +1 -66
  222. package/src/grammar/schemas/concreteGraphic.js +11 -0
  223. package/src/grammar/schemas/graphic.js +3 -0
  224. package/src/grammar/schemas/semanticPath.js +5 -3
  225. package/src/grammar/sort.js +88 -0
  226. package/src/grammar/stack.js +2 -10
  227. package/src/grammar/statisticalReference.js +1 -6
  228. package/src/grammar/summary.js +120 -45
  229. package/src/grammar/text.js +19 -0
  230. package/src/grammar/timeUnit.js +16 -7
  231. package/src/grammar/transformKeys.js +47 -0
  232. package/src/grammar/transformTopology.js +1 -0
  233. package/src/grammar/transforms.js +25 -12
  234. package/src/grammar/valueFormat.js +17 -5
  235. package/src/grammar/weightedStatistics.js +1 -6
  236. package/src/grammar/window.js +4 -58
  237. package/src/inspection.js +495 -0
  238. package/src/inspectionDescriptors.js +3 -0
  239. package/src/layout/canvas.js +1 -110
  240. package/src/layout/facets.js +1 -244
  241. package/src/layout/labels.js +1 -0
  242. package/src/layout/legend.js +13 -0
  243. package/src/layout/legendGroup.js +1 -0
  244. package/src/layout/legendItems.js +59 -15
  245. package/src/layout/legendLane.js +1 -441
  246. package/src/layout/legendText.js +1 -0
  247. package/src/layout/title.js +35 -13
  248. package/src/materialization/bars/aggregate.js +11 -5
  249. package/src/materialization/bars/histogram.js +4 -1
  250. package/src/materialization/bars/ranged.js +19 -6
  251. package/src/materialization/bars/resolve.js +26 -3
  252. package/src/materialization/coordinateBounds.js +8 -0
  253. package/src/materialization/dependencies.js +4 -44
  254. package/src/materialization/facetGuides/layout.js +1 -0
  255. package/src/materialization/facetGuides/placement.js +19 -8
  256. package/src/materialization/facetGuides/preparation.js +15 -7
  257. package/src/materialization/facetHeaders.js +1 -347
  258. package/src/materialization/facets.js +1 -185
  259. package/src/materialization/graphicHierarchy.js +1 -1
  260. package/src/materialization/guides/layout.js +1 -57
  261. package/src/materialization/guides/resources.js +1 -123
  262. package/src/materialization/layout.js +53 -0
  263. package/src/materialization/legendGroups.js +1 -0
  264. package/src/materialization/legendText.js +1 -0
  265. package/src/materialization/legends.js +1 -1
  266. package/src/materialization/marks/capabilities.js +5 -6
  267. package/src/materialization/rect.js +1 -1
  268. package/src/materialization/revisionIdentity.js +19 -0
  269. package/src/materialization/scaleGuideDependencies.js +1 -1
  270. package/src/materialization/scales/map.js +3 -0
  271. package/src/materialization/scales/policies/arc.js +8 -7
  272. package/src/materialization/scales/policies/bar.js +19 -7
  273. package/src/materialization/scales/policies/series.js +2 -1
  274. package/src/materialization/scales/resolve.js +72 -7
  275. package/src/materialization/selection/items/arc.js +1 -1
  276. package/src/materialization/selection/items/bar.js +7 -6
  277. package/src/materialization/selection/items/path.js +7 -6
  278. package/src/materialization/selection/items/rect.js +2 -2
  279. package/src/materialization/text.js +17 -6
  280. package/src/materialization/textLines.js +15 -0
  281. package/src/persistence/codec.js +37 -6
  282. package/src/persistence/validation.js +47 -0
  283. package/src/persistence.js +94 -8
  284. package/src/renderers/canvas/circle.js +6 -3
  285. package/src/renderers/canvas/fill.js +7 -1
  286. package/src/renderers/canvas/index.js +2 -1
  287. package/src/renderers/canvas/line.js +1 -0
  288. package/src/renderers/canvas/path.js +1 -1
  289. package/src/renderers/canvas/rect.js +11 -8
  290. package/src/renderers/canvas/stroke.js +2 -1
  291. package/src/renderers/canvas/text.js +5 -3
  292. package/src/renderers/svg.js +4 -1
  293. package/src/selectors/layers.js +19 -0
  294. package/src/theme/defaults.js +8 -2
  295. package/src/version.js +1 -1
  296. package/types/basic.d.ts +1 -0
  297. package/types/index.d.ts +7 -0
  298. package/types/inspection.d.ts +17 -0
  299. package/types/program.d.ts +494 -112
@@ -7,6 +7,7 @@ export interface TextMeasurement {
7
7
  readonly fontFamily: string;
8
8
  readonly fontSize: number;
9
9
  readonly fontWeight: TextMetricFontWeight;
10
+ readonly fontStyle?: "normal" | "italic";
10
11
  readonly width: number;
11
12
  }
12
13
  export interface TextMetricsProfile {
@@ -18,6 +19,11 @@ export interface ApplyTextMetricsOptions { profile: TextMetricsProfile; }
18
19
 
19
20
  export type ThemeName = "light" | "dark";
20
21
  export interface ThemeTokens {
22
+ axisLabel?: string;
23
+ axisLabelFontFamily?: string;
24
+ axisTitleFontFamily?: string;
25
+ axisLabelFontSize?: number;
26
+ axisTitleFontSize?: number;
21
27
  background: string;
22
28
  mark: string;
23
29
  text: string;
@@ -162,6 +168,8 @@ export interface EditCompositionLayoutOptions {
162
168
  gap?: number;
163
169
  align?: CompositionAlign;
164
170
  padding?: number | CompositionPadding;
171
+ /** Interpret gap between child canvases (default) or inner plot regions. */
172
+ spacing?: "canvas" | "plot";
165
173
  }
166
174
  export interface ReplaceCompositionChildOptions {
167
175
  target: string;
@@ -208,6 +216,9 @@ export interface FacetOptions {
208
216
  padding?: number | CompositionPadding;
209
217
  scales?: FacetScaleResolutions;
210
218
  guides?: FacetGuideOptions;
219
+ headers?: FacetHeadersOptions;
220
+ /** Interpret gap between child canvases (default) or inner plot regions. */
221
+ spacing?: "canvas" | "plot";
211
222
  }
212
223
  export interface FacetGridRole {
213
224
  field: string;
@@ -224,6 +235,9 @@ export interface FacetGridOptions {
224
235
  padding?: number | CompositionPadding;
225
236
  scales?: FacetScaleResolutions;
226
237
  guides?: FacetGuideOptions;
238
+ headers?: FacetHeadersOptions;
239
+ /** Interpret gap between child canvases (default) or inner plot regions. */
240
+ spacing?: "canvas" | "plot";
227
241
  }
228
242
  export interface RepeatChartsOptions {
229
243
  id?: string;
@@ -236,6 +250,9 @@ export interface RepeatChartsOptions {
236
250
  padding?: number | CompositionPadding;
237
251
  scales?: FacetScaleResolutions;
238
252
  guides?: FacetGuideOptions;
253
+ headers?: FacetHeadersOptions;
254
+ /** Interpret gap between child canvases (default) or inner plot regions. */
255
+ spacing?: "canvas" | "plot";
239
256
  }
240
257
  export interface EditFacetSourceOptions { program: ChartProgram; }
241
258
  export interface EditFacetHeadersOptions {
@@ -249,6 +266,10 @@ export interface EditFacetHeadersOptions {
249
266
  side?: FacetHeaderSide;
250
267
  align?: FacetHeaderAlign;
251
268
  }
269
+ export type FacetHeadersOptions = Omit<EditFacetHeadersOptions, "role" | "side"> & {
270
+ row?: Omit<EditFacetHeadersOptions, "role">;
271
+ column?: Omit<EditFacetHeadersOptions, "role">;
272
+ };
252
273
  export type FacetHeaderRole = "all" | "row" | "column";
253
274
  export type FacetHeaderSide = "top" | "bottom" | "left" | "right";
254
275
  export type FacetHeaderAlign = "start" | "center" | "end";
@@ -265,6 +286,7 @@ export interface FacetCompositionSpec {
265
286
  readonly type: "facet";
266
287
  readonly children: readonly string[];
267
288
  readonly columns: number;
289
+ readonly spacing?: "canvas" | "plot";
268
290
  readonly gap: number;
269
291
  readonly align: CompositionAlign;
270
292
  readonly padding: Readonly<Required<CompositionPadding>>;
@@ -339,21 +361,29 @@ export type DensityPlacement =
339
361
  export type FilterComparison =
340
362
  | { op: "eq" | "neq"; value: unknown }
341
363
  | { op: "lt" | "lte" | "gt" | "gte"; value: number | string };
342
- export type FilterRange = {
343
- min: number | string;
344
- max: number | string;
345
- inclusive?: boolean;
346
- };
364
+ type FilterBound = number | string;
365
+ type FilterRangeBounds =
366
+ | { min: FilterBound; max?: FilterBound }
367
+ | { min?: FilterBound; max: FilterBound };
368
+ type FilterRangeClosure =
369
+ | { inclusive?: boolean; minInclusive?: never; maxInclusive?: never }
370
+ | { inclusive?: never; minInclusive?: boolean; maxInclusive?: boolean };
371
+ export type FilterRange = FilterRangeBounds & FilterRangeClosure;
347
372
  export type FilterModeOptions =
348
- | { oneOf: readonly unknown[]; predicate?: never; range?: never }
349
- | { oneOf?: never; predicate: FilterComparison; range?: never }
350
- | { oneOf?: never; predicate?: never; range: FilterRange };
373
+ | { oneOf: readonly [DatasetScalar, ...DatasetScalar[]]; noneOf?: never; predicate?: never; range?: never }
374
+ | { oneOf?: never; noneOf: readonly [DatasetScalar, ...DatasetScalar[]]; predicate?: never; range?: never }
375
+ | { oneOf?: never; noneOf?: never; predicate: FilterComparison; range?: never }
376
+ | { oneOf?: never; noneOf?: never; predicate?: never; range: FilterRange };
351
377
  export type FilterDataOptions = {
352
378
  id: string;
353
379
  source?: string;
354
380
  field: string;
381
+ nulls?: "include" | "exclude";
355
382
  } & FilterModeOptions;
356
383
  export type DatasetScalar = string | number | boolean | null;
384
+ export type RegressionPredictOptions =
385
+ | { values: readonly [number, ...number[]]; domain?: never; steps?: never }
386
+ | { values?: never; domain: readonly [number, number]; steps: number };
357
387
  export type DisplayLabelMap = ReadonlyArray<Readonly<{
358
388
  value: DatasetScalar;
359
389
  label: string;
@@ -364,10 +394,12 @@ export interface DisplayLabelOptions {
364
394
  export type DatasetFilterTransform = {
365
395
  type: "filter";
366
396
  field: string;
397
+ nulls?: "include" | "exclude";
367
398
  } & (
368
- | { oneOf: readonly DatasetScalar[]; predicate?: never; range?: never }
369
- | { oneOf?: never; predicate: FilterComparison; range?: never }
370
- | { oneOf?: never; predicate?: never; range: FilterRange }
399
+ | { oneOf: readonly DatasetScalar[]; noneOf?: never; predicate?: never; range?: never }
400
+ | { oneOf?: never; noneOf: readonly DatasetScalar[]; predicate?: never; range?: never }
401
+ | { oneOf?: never; noneOf?: never; predicate: FilterComparison; range?: never }
402
+ | { oneOf?: never; noneOf?: never; predicate?: never; range: FilterRange }
371
403
  );
372
404
  export type DatasetRegressionTransform = {
373
405
  type: "regression";
@@ -375,34 +407,35 @@ export type DatasetRegressionTransform = {
375
407
  y: string;
376
408
  groupBy?: string;
377
409
  } & (
378
- | {
410
+ | ({
379
411
  method: "linear";
380
- interval: "mean" | "prediction";
381
412
  degree?: never;
382
413
  span?: never;
383
- } & (
414
+ robustIterations?: never;
415
+ } & ({ interval: false; confidenceMethod?: never; level?: never; confidence?: never } | ({ interval: "mean" | "prediction" } & (
384
416
  | { confidenceMethod: ConfidenceIntervalMethod; level: number; confidence?: never }
385
417
  | { confidence: number; confidenceMethod?: never; level?: never }
386
- )
387
- | {
418
+ ))))
419
+ | ({
388
420
  method: "polynomial";
389
421
  degree: number;
390
- interval: "mean" | "prediction";
391
422
  span?: never;
392
- } & (
423
+ robustIterations?: never;
424
+ } & ({ interval: false; confidenceMethod?: never; level?: never; confidence?: never } | ({ interval: "mean" | "prediction" } & (
393
425
  | { confidenceMethod: ConfidenceIntervalMethod; level: number; confidence?: never }
394
426
  | { confidence: number; confidenceMethod?: never; level?: never }
395
- )
427
+ ))))
396
428
  | {
397
429
  method: "loess";
398
430
  span: number;
431
+ robustIterations?: number;
399
432
  degree?: never;
400
433
  confidenceMethod?: never;
401
434
  level?: never;
402
435
  confidence?: never;
403
436
  interval?: never;
404
437
  }
405
- );
438
+ ) & { readonly predict?: RegressionPredictOptions; readonly missing?: "error" | "drop" };
406
439
  export interface DatasetDensityTransform {
407
440
  type: "density";
408
441
  field: string;
@@ -413,6 +446,7 @@ export interface DatasetDensityTransform {
413
446
  kernel?: DensityKernel;
414
447
  normalization?: DensityNormalization;
415
448
  weight?: StatisticalWeight;
449
+ missing?: "error" | "drop";
416
450
  as: readonly [string, string];
417
451
  resolve: "shared";
418
452
  placement?: {
@@ -500,6 +534,7 @@ export type DatasetIntervalTransform = {
500
534
  field: string;
501
535
  groupBy: readonly string[];
502
536
  as: DatasetIntervalOutputFields;
537
+ missing?: "error" | "drop";
503
538
  } & (
504
539
  | {
505
540
  center: "mean";
@@ -603,6 +638,21 @@ export interface DatasetWindowTransform {
603
638
  readonly operations: readonly DatasetWindowOperation[];
604
639
  readonly temporalUnit?: TemporalInputUnit;
605
640
  }
641
+ export interface SortKey {
642
+ field: string;
643
+ order?: "ascending" | "descending";
644
+ nulls?: "first" | "last";
645
+ temporalUnit?: "year" | "timestamp";
646
+ }
647
+ export interface DatasetSortTransform {
648
+ readonly type: "sort";
649
+ readonly sortBy: readonly {
650
+ readonly field: string;
651
+ readonly order: "ascending" | "descending";
652
+ readonly nulls: "first" | "last";
653
+ readonly temporalUnit?: "year" | "timestamp";
654
+ }[];
655
+ }
606
656
  export interface ECDFOutputFields {
607
657
  value: string;
608
658
  cumulative: string;
@@ -715,6 +765,7 @@ export interface DatasetBinTransform {
715
765
  readonly includeEmpty: boolean;
716
766
  readonly members: boolean;
717
767
  readonly weight?: StatisticalWeight;
768
+ readonly missing?: "error" | "drop";
718
769
  readonly as: {
719
770
  readonly lower: string;
720
771
  readonly upper: string;
@@ -735,11 +786,28 @@ export interface DatasetFoldTransform {
735
786
  readonly value: string;
736
787
  };
737
788
  }
789
+ export type ParseTimeFormat = "auto" | "%Y-%m-%d" | "%d/%m/%Y" | "%m/%d/%Y";
738
790
  export type ComputedExpression =
739
791
  | { readonly field: string }
740
792
  | { readonly constant: number | string | boolean | null }
741
793
  | {
742
- readonly op: "negate" | "absolute" | "log" | "sqrt" | "not" | "isNull";
794
+ readonly op: "getPath";
795
+ readonly operand: { readonly field: string };
796
+ readonly path: readonly [string, ...string[]];
797
+ }
798
+ | {
799
+ readonly op: "replaceLiteral";
800
+ readonly operand: ComputedExpression;
801
+ readonly search: string;
802
+ readonly replacement: string;
803
+ }
804
+ | {
805
+ readonly op: "parseTime";
806
+ readonly operand: ComputedExpression;
807
+ readonly format?: ParseTimeFormat;
808
+ }
809
+ | {
810
+ readonly op: "negate" | "absolute" | "log" | "sqrt" | "not" | "isNull" | "toNumber";
743
811
  readonly operand: ComputedExpression;
744
812
  }
745
813
  | {
@@ -826,6 +894,7 @@ type DatasetImputedBaseTransform = {
826
894
  readonly maxGap?: number;
827
895
  };
828
896
  export type DatasetImputedTransform = DatasetImputedBaseTransform & (
897
+ | { readonly method: "mean"; readonly value?: never; readonly sortBy: readonly DatasetWindowSort[]; }
829
898
  | {
830
899
  readonly method: "constant";
831
900
  readonly value: DatasetScalar;
@@ -871,6 +940,7 @@ export type DatasetTransform =
871
940
  | DatasetFilterTransform
872
941
  | DatasetFoldTransform
873
942
  | DatasetRegressionTransform
943
+ | DatasetSortTransform
874
944
  | DatasetDensityTransform
875
945
  | DatasetECDFTransform
876
946
  | DatasetHorizonTransform
@@ -902,6 +972,8 @@ export interface DatasetSummaryTransform {
902
972
  aggregates: readonly SummaryAggregateOptions[];
903
973
  members?: string;
904
974
  weight?: StatisticalWeight;
975
+ missing?: "error" | "drop";
976
+ empty?: "null" | "identity";
905
977
  }
906
978
  export interface SummaryAggregateOptions {
907
979
  op: AggregateOperation;
@@ -915,6 +987,18 @@ export interface SummaryDataOptions {
915
987
  aggregates: readonly SummaryAggregateOptions[];
916
988
  members?: string;
917
989
  weight?: StatisticalWeight;
990
+ missing?: "error" | "drop";
991
+ empty?: "null" | "identity";
992
+ }
993
+ export interface SortedDataOptions {
994
+ id: string;
995
+ source?: string;
996
+ sortBy: readonly [SortKey, ...SortKey[]];
997
+ }
998
+ export interface EditSortedDataOptions {
999
+ target: string;
1000
+ sortBy: readonly [SortKey, ...SortKey[]];
1001
+ dependents?: DerivedDataDependents;
918
1002
  }
919
1003
  export interface BindMarkDataOptions {
920
1004
  target: string;
@@ -1041,6 +1125,10 @@ export type StrokeStyleDetails = {
1041
1125
  };
1042
1126
  export type RectStyleDetails = StrokeStyleDetails & {
1043
1127
  cornerRadius?: number;
1128
+ cornerRadiusTopLeft?: number;
1129
+ cornerRadiusTopRight?: number;
1130
+ cornerRadiusBottomRight?: number;
1131
+ cornerRadiusBottomLeft?: number;
1044
1132
  };
1045
1133
  export type PaletteName =
1046
1134
  | "accent"
@@ -1094,19 +1182,59 @@ export interface TraceNode {
1094
1182
 
1095
1183
  export interface SemanticDataset {
1096
1184
  readonly id: string;
1185
+ readonly schema: DatasetSchema;
1097
1186
  readonly values?: readonly Readonly<Record<string, unknown>>[];
1098
1187
  readonly source?: string;
1099
1188
  readonly transform?: readonly Readonly<Record<string, unknown>>[];
1100
1189
  readonly [key: string]: unknown;
1101
1190
  }
1102
1191
 
1192
+ export type DatasetStorageType =
1193
+ | "number"
1194
+ | "string"
1195
+ | "boolean"
1196
+ | "array"
1197
+ | "object"
1198
+ | "unknown"
1199
+ | "mixed";
1200
+ export interface DatasetFieldLineage {
1201
+ readonly inputs: readonly Readonly<{ data: string; field: string }>[];
1202
+ readonly owner: string;
1203
+ readonly role: string;
1204
+ }
1205
+ export interface DatasetSchemaField {
1206
+ /** Lossless stored row key; empty names cannot be used as action field references. */
1207
+ readonly name: string;
1208
+ readonly storageType: DatasetStorageType;
1209
+ readonly nullable: boolean;
1210
+ readonly optional: boolean;
1211
+ readonly lineage?: DatasetFieldLineage;
1212
+ }
1213
+ export interface DatasetSchema {
1214
+ readonly version: 1;
1215
+ readonly completeness: "known" | "unknown";
1216
+ readonly origin: "declared" | "inferred" | "derived";
1217
+ readonly fields: readonly DatasetSchemaField[];
1218
+ }
1219
+ export interface SourceSchemaField {
1220
+ /** Exact source row key, including an empty string or whitespace. */
1221
+ name: string;
1222
+ storageType: Exclude<DatasetStorageType, "unknown" | "mixed">;
1223
+ nullable?: boolean;
1224
+ optional?: boolean;
1225
+ }
1226
+ export interface SourceSchemaInput {
1227
+ fields: readonly SourceSchemaField[];
1228
+ }
1229
+
1103
1230
  export interface SemanticLayer {
1104
1231
  readonly id: string;
1105
1232
  readonly data?: string;
1106
1233
  readonly source?: string;
1107
1234
  readonly coordinate?: string;
1108
- readonly mark?: Readonly<{ type?: string; missing?: "error" | "break"; [key: string]: unknown }>;
1235
+ readonly mark?: Readonly<{ type?: string; missing?: "error" | "break" | "skip"; [key: string]: unknown }>;
1109
1236
  readonly layout?: Readonly<{ mode?: ColorLayout }>;
1237
+ readonly derivedBindings?: Readonly<{ regression?: Readonly<{ mode: "follow"; roles: readonly ["data", "x", "y"] }> }>;
1110
1238
  readonly encoding?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
1111
1239
  readonly [key: string]: unknown;
1112
1240
  }
@@ -1115,6 +1243,7 @@ export interface SemanticScale {
1115
1243
  readonly id: string;
1116
1244
  readonly type?: ScaleType;
1117
1245
  readonly domain?: "auto" | readonly unknown[];
1246
+ readonly emptyDomain?: "preserve" | "require-explicit";
1118
1247
  readonly range?: ScaleRange;
1119
1248
  readonly [key: string]: unknown;
1120
1249
  }
@@ -1160,6 +1289,15 @@ export interface CanvasOptions {
1160
1289
  height?: number;
1161
1290
  background?: string;
1162
1291
  margin?: number | Partial<Record<"top" | "right" | "bottom" | "left", number>>;
1292
+ /** Exact inner dimensions with automatic outer guide margins; false disables this mode. */
1293
+ plot?: { width: number; height: number } | false;
1294
+ /** Optional inner plot outline. Defaults off; an object replaces the complete style on edit. */
1295
+ plotBorder?: false | {
1296
+ /** Non-empty color string. Defaults to #ddd. */
1297
+ color?: string;
1298
+ /** Positive finite width smaller than both plot dimensions. Defaults to 1. */
1299
+ lineWidth?: number;
1300
+ };
1163
1301
  }
1164
1302
 
1165
1303
  export interface FitCanvasOptions {
@@ -1181,7 +1319,7 @@ export type RotationUnit = "radians" | "degrees";
1181
1319
  export type RotationInput = number | { value: number; unit: RotationUnit };
1182
1320
  type ValueFormatDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
1183
1321
  type ValueFormatPrecision = ValueFormatDigit | 10 | 11 | 12 | `0${ValueFormatDigit}`;
1184
- type TimeAxisDirective = "Y" | "m" | "d" | "b";
1322
+ type TimeAxisDirective = "Y" | "m" | "d" | "b" | "H" | "M" | "S" | "L";
1185
1323
  export type NumericFormatString = `.${ValueFormatPrecision}${"f" | "%" | "e"}`;
1186
1324
  export type UtcFormatString = `${string}%${TimeAxisDirective}${string}`;
1187
1325
  export type ValueFormat = "auto" | NumericFormatString | UtcFormatString;
@@ -1197,6 +1335,10 @@ export interface AxisLineStyleOptions {
1197
1335
  export interface AxisTickStyleOptions extends AxisLineStyleOptions {
1198
1336
  length?: number;
1199
1337
  }
1338
+ export interface CartesianAxisTickStyleOptions extends AxisTickStyleOptions {
1339
+ /** Signed logical pixels along the axis: positive right for x, down for y. */
1340
+ alongOffset?: number;
1341
+ }
1200
1342
  export interface AxisLabelStyleOptions {
1201
1343
  offset?: number;
1202
1344
  format?: AxisFormat;
@@ -1205,6 +1347,18 @@ export interface AxisLabelStyleOptions {
1205
1347
  fontFamily?: string;
1206
1348
  fontWeight?: string | number;
1207
1349
  }
1350
+ export type CartesianAxisLabelColorMap = ReadonlyArray<Readonly<{
1351
+ value: DatasetScalar;
1352
+ color: string;
1353
+ }>>;
1354
+ export interface CartesianAxisLabelStyleOptions extends AxisLabelStyleOptions {
1355
+ /** Typed raw-tick color overrides; missing entries use color. Auto removes the map. */
1356
+ colorMap?: CartesianAxisLabelColorMap | "auto";
1357
+ /** Keep unrotated label bounds inside the mapped axis span; defaults to false. */
1358
+ flush?: boolean;
1359
+ /** Signed displacement from the mapped tick position, independent of outward offset. */
1360
+ alongOffset?: number;
1361
+ }
1208
1362
  export interface AxisLabelLayoutOptions {
1209
1363
  /** Legacy numbers are radians; structured values make radians or degrees explicit. */
1210
1364
  rotation?: RotationInput;
@@ -1220,10 +1374,11 @@ export interface AxisTicksAndLabelsOptions<P extends string> {
1220
1374
  position?: P;
1221
1375
  count?: number;
1222
1376
  values?: readonly AxisValue[];
1223
- ticks?: AxisTickStyleOptions;
1224
- labels?: AxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1377
+ ticks?: CartesianAxisTickStyleOptions;
1378
+ labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1225
1379
  }
1226
1380
  export interface AxisTitleOptions<P extends string> {
1381
+ /** Hard breaks retain ordered centered lines, spaced at 1.2 times fontSize. */
1227
1382
  text?: string;
1228
1383
  scale?: string;
1229
1384
  position?: P;
@@ -1254,14 +1409,15 @@ export interface CreateAxesOptions {
1254
1409
  radius?: false | CompleteRadialAxisOptions;
1255
1410
  }
1256
1411
  export interface AxisTickOptions<P extends string>
1257
- extends AxisTickStyleOptions {
1412
+ extends CartesianAxisTickStyleOptions {
1258
1413
  scale?: string;
1259
1414
  position?: P;
1260
1415
  count?: number;
1261
1416
  values?: readonly AxisValue[];
1262
1417
  }
1418
+ /** Cartesian label maps use typed category values or finite numeric/timestamp keys on continuous scales. Empty mapped labels are omitted without removing ticks. */
1263
1419
  export interface AxisLabelOptions<P extends string>
1264
- extends AxisLabelStyleOptions, AxisLabelLayoutOptions, DisplayLabelOptions {
1420
+ extends CartesianAxisLabelStyleOptions, AxisLabelLayoutOptions, DisplayLabelOptions {
1265
1421
  scale?: string;
1266
1422
  position?: P;
1267
1423
  count?: number;
@@ -1384,17 +1540,29 @@ export interface EditRadialAxisOptions
1384
1540
  }
1385
1541
 
1386
1542
  export interface GridDirectionOptions {
1543
+ /** Signed logical pixels along the scale: vertical lines right, horizontal lines down. */
1544
+ alongOffset?: number;
1545
+ /** Grid draw order relative to marks at zero: positive above, nonpositive behind. */
1546
+ zIndex?: number;
1547
+ /** Band centers by default; boundary draws both edges of each selected band. */
1548
+ bandPosition?: "center" | "boundary";
1387
1549
  scale?: string;
1388
1550
  coordinate?: string;
1389
1551
  count?: number;
1390
- values?: readonly number[];
1552
+ values?: readonly CategoryValue[];
1391
1553
  color?: string;
1392
1554
  lineWidth?: number;
1393
1555
  strokeDash?: readonly number[];
1394
1556
  }
1395
1557
  export interface EditGridOptions {
1558
+ /** Absolute signed logical-pixel displacement; omission preserves the current value. */
1559
+ alongOffset?: number;
1560
+ /** Preserve omitted order; finite values sort Cartesian grids relative to marks at zero. */
1561
+ zIndex?: number;
1562
+ /** Band centers by default; boundary draws both edges of each selected band. */
1563
+ bandPosition?: "center" | "boundary";
1396
1564
  count?: number;
1397
- values?: readonly number[] | "auto";
1565
+ values?: readonly CategoryValue[] | "auto";
1398
1566
  color?: string;
1399
1567
  lineWidth?: number;
1400
1568
  strokeDash?: readonly number[];
@@ -1441,7 +1609,7 @@ type CartesianAxesOptions = Omit<
1441
1609
  coordinate?: { id?: string; type?: "auto" | "cartesian" };
1442
1610
  };
1443
1611
  type CAxisTicks<P extends string> = Omit<AxisTicksAndLabelsOptions<P>, "labels"> & {
1444
- labels?: AxisLabelStyleOptions & AxisLabelLayoutOptions;
1612
+ labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1445
1613
  };
1446
1614
  type CAxis<P extends string> = Omit<CompleteAxisOptions<P>, "ticksAndLabels"> & {
1447
1615
  ticksAndLabels?: false | Omit<CAxisTicks<P>, "scale" | "position">;
@@ -1451,11 +1619,14 @@ type CAxes = Omit<CartesianAxesOptions, "x" | "y"> & {
1451
1619
  y?: false | CAxis<YAxisPosition>;
1452
1620
  };
1453
1621
  type CartesianGridOptions = Pick<CreateGridOptions, "horizontal" | "vertical">;
1454
- type FilledMarkLegendOptions = Omit<LegendOptions, "symbol"> & {
1455
- symbol?: "auto"
1456
- | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
1457
- | { layers: readonly LegendSymbolLayer[] };
1458
- };
1622
+ type FilledLegendSymbolRecipe = "auto"
1623
+ | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
1624
+ | { layers: readonly LegendSymbolLayer[] };
1625
+ type FilledMarkLegendOptions = Omit<LegendOptions, "symbol" | "representation"> & (
1626
+ | { representation?: "gradient"; symbol?: FilledLegendSymbolRecipe }
1627
+ | { representation: "symbols"; symbol?: "auto" | { type?: "point"; radius?: number; stroke?: string; strokeWidth?: number } }
1628
+ );
1629
+ type DistributiveLegendOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
1459
1630
  type CategoricalLegendTextOptions = {
1460
1631
  offset?: number;
1461
1632
  color?: string;
@@ -1466,7 +1637,7 @@ type CategoricalLegendTextOptions = {
1466
1637
  };
1467
1638
  type PathLegendOptions = Omit<
1468
1639
  LegendOptions,
1469
- "symbol" | "gradient" | "count" | "values" | "labels"
1640
+ "symbol" | "gradient" | "count" | "values" | "labels" | "representation"
1470
1641
  > & {
1471
1642
  symbol?: "auto" | { length?: number; lineWidth?: number }
1472
1643
  | { layers: readonly LegendSymbolLayer[] };
@@ -1475,7 +1646,7 @@ type PathLegendOptions = Omit<
1475
1646
  type CartesianGuideOptions = {
1476
1647
  axes?: false | CartesianAxesOptions;
1477
1648
  grid?: false | CartesianGridOptions;
1478
- legend?: false | (Omit<FilledMarkLegendOptions, "order"> & { order?: CartesianLegendOrder });
1649
+ legend?: false | (DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & { order?: CartesianLegendOrder });
1479
1650
  };
1480
1651
  type CartesianPathGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1481
1652
  legend?: false | (Omit<PathLegendOptions, "order"> & { order?: LegendValueOrder });
@@ -1483,8 +1654,9 @@ type CartesianPathGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1483
1654
  type CartesianCategoricalGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1484
1655
  legend?: false | (Omit<
1485
1656
  FilledMarkLegendOptions,
1486
- "count" | "values" | "gradient" | "labels" | "order"
1657
+ "count" | "values" | "gradient" | "labels" | "order" | "representation" | "symbol"
1487
1658
  > & {
1659
+ symbol?: FilledLegendSymbolRecipe;
1488
1660
  labels?: CategoricalLegendTextOptions;
1489
1661
  order?: CartesianLegendOrder;
1490
1662
  });
@@ -1496,7 +1668,7 @@ type CCategoricalGuides = Omit<CartesianCategoricalGuideOptions, "axes"> & {
1496
1668
  axes?: false | CAxes;
1497
1669
  };
1498
1670
  type ColorGuides = Omit<CartesianGuideOptions, "legend"> & {
1499
- legend?: false | (Omit<FilledMarkLegendOptions, "values" | "order"> & {
1671
+ legend?: false | (DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & {
1500
1672
  order?: CartesianLegendOrder;
1501
1673
  });
1502
1674
  };
@@ -1537,9 +1709,11 @@ export type PolarFrameCenter = {
1537
1709
  export type PolarFrameRadius =
1538
1710
  | { unit: "fraction"; value: number }
1539
1711
  | { unit: "px"; value: number };
1712
+ export type ArcInnerRadius = number | { unit: "px"; value: number };
1540
1713
  export type PolarFrameOptions = "auto" | {
1541
1714
  center?: PolarFrameCenter;
1542
1715
  radius?: PolarFrameRadius;
1716
+ overflow?: "error" | "allow";
1543
1717
  };
1544
1718
 
1545
1719
  type EditCoordinateTarget = {
@@ -1557,6 +1731,7 @@ export interface ScaleOptions {
1557
1731
  id?: string;
1558
1732
  type?: ScaleType;
1559
1733
  domain?: "auto" | readonly unknown[];
1734
+ emptyDomain?: "preserve" | "require-explicit";
1560
1735
  range?: ScaleRange;
1561
1736
  nice?: boolean;
1562
1737
  zero?: boolean;
@@ -1643,6 +1818,14 @@ type ContinuousSizeScaleOptions = SizeScaleCommonOptions &
1643
1818
  domain?: "auto" | readonly [number, number];
1644
1819
  range?: "auto" | readonly [number, number];
1645
1820
  };
1821
+ export type CategoricalSizeScaleOptions = SizeScaleCommonOptions & {
1822
+ type?: "ordinal";
1823
+ domain?: "auto" | readonly (string | number | boolean)[];
1824
+ range?: "auto" | readonly [number, ...number[]];
1825
+ clamp?: never;
1826
+ base?: never;
1827
+ exponent?: never;
1828
+ };
1646
1829
  export type SizeScaleOptions =
1647
1830
  | (ContinuousSizeScaleOptions & {
1648
1831
  type?: "linear";
@@ -1691,6 +1874,7 @@ export type SizeScaleOptions =
1691
1874
  export type ShapeScaleOptions = ScaleFields<"id"> & {
1692
1875
  type?: "ordinal";
1693
1876
  domain?: "auto" | readonly unknown[];
1877
+ /** One entry per domain value; explicit repeated shapes are allowed. Auto uses distinct shapes. */
1694
1878
  range?: "auto" | readonly PointShape[];
1695
1879
  unknown?: PointShape;
1696
1880
  };
@@ -1702,6 +1886,7 @@ export interface EditScaleOptions {
1702
1886
  id?: string;
1703
1887
  type?: ScaleType;
1704
1888
  domain?: "auto" | readonly unknown[];
1889
+ emptyDomain?: "preserve" | "require-explicit";
1705
1890
  range?: ScaleRange;
1706
1891
  nice?: boolean;
1707
1892
  zero?: boolean;
@@ -1750,8 +1935,8 @@ export type EditStrokeScaleOptions = { target: string } & Omit<
1750
1935
  >;
1751
1936
  type ExistingSizeScaleEditPatch = {
1752
1937
  type?: never;
1753
- domain?: "auto" | readonly [number, ...number[]];
1754
- range?: "auto" | readonly [number, number, ...number[]];
1938
+ domain?: "auto" | readonly [string | number | boolean, ...(string | number | boolean)[]];
1939
+ range?: "auto" | readonly [number, ...number[]];
1755
1940
  unknown?: number;
1756
1941
  clamp?: boolean;
1757
1942
  reverse?: boolean;
@@ -1759,6 +1944,7 @@ type ExistingSizeScaleEditPatch = {
1759
1944
  exponent?: number;
1760
1945
  };
1761
1946
  type SizeScaleTypeEditPatch =
1947
+ | (WithoutScaleId<CategoricalSizeScaleOptions> & { type: "ordinal" })
1762
1948
  | (Omit<WithoutScaleId<SizeScaleOptions>, "type"> & { type?: "linear" })
1763
1949
  | (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "log" }>, "type"> & {
1764
1950
  type: "log";
@@ -1897,6 +2083,8 @@ export type RadialEncodingOptions = {
1897
2083
  coordinate?: string;
1898
2084
  } & (
1899
2085
  | { field: string; mapping?: false; aggregate?: never; scale?: RadiusScaleOptions }
2086
+ | { field: string; mapping?: never; aggregate: "sum"; scale?: RadiusScaleOptions }
2087
+ | { field?: never; mapping?: never; aggregate: "count"; scale?: RadiusScaleOptions }
1900
2088
  | { field: string; mapping?: RadialMapping; aggregate: "sum"; scale?: MeasuredRadiusScaleOptions }
1901
2089
  | { field?: never; mapping?: RadialMapping; aggregate: "count"; scale?: MeasuredRadiusScaleOptions }
1902
2090
  );
@@ -2017,6 +2205,7 @@ export interface DensityDataOptions {
2017
2205
  kernel?: DensityKernel;
2018
2206
  normalization?: DensityNormalization;
2019
2207
  weight?: StatisticalWeight;
2208
+ missing?: "error" | "drop";
2020
2209
  as?: readonly [string, string];
2021
2210
  }
2022
2211
 
@@ -2112,6 +2301,7 @@ export interface IntervalDataOptions {
2112
2301
  extent?: IntervalExtent;
2113
2302
  method?: ConfidenceIntervalMethod;
2114
2303
  level?: number;
2304
+ missing?: "error" | "drop";
2115
2305
  as?: IntervalOutputFields;
2116
2306
  }
2117
2307
 
@@ -2139,7 +2329,8 @@ type TimeUnitDataBaseOptions = {
2139
2329
  source?: string;
2140
2330
  field: string;
2141
2331
  temporalUnit?: TemporalInputUnit;
2142
- as: string;
2332
+ /** Defaults to `${field}_${unit}`; collisions are rejected. */
2333
+ as?: string;
2143
2334
  timeZone?: string;
2144
2335
  };
2145
2336
  export type TimeUnitDataOptions = TimeUnitDataBaseOptions & (
@@ -2184,6 +2375,7 @@ export type BinDataOptions = {
2184
2375
  includeEmpty?: boolean;
2185
2376
  members?: boolean;
2186
2377
  weight?: StatisticalWeight;
2378
+ missing?: "error" | "drop";
2187
2379
  as?: BinDataOutputFields;
2188
2380
  } & BinDataMode;
2189
2381
 
@@ -2260,6 +2452,7 @@ type ImputedDataBaseOptions = {
2260
2452
  maxGap?: number;
2261
2453
  };
2262
2454
  export type ImputedDataOptions = ImputedDataBaseOptions & (
2455
+ | { method?: "mean"; value?: never; sortBy?: readonly WindowSort[]; }
2263
2456
  | {
2264
2457
  method: "constant";
2265
2458
  value: DatasetScalar;
@@ -2277,7 +2470,7 @@ export type ImputedDataOptions = ImputedDataBaseOptions & (
2277
2470
  }
2278
2471
  );
2279
2472
  export interface StackDataOptions {
2280
- id: string;
2473
+ id?: string;
2281
2474
  source?: string;
2282
2475
  category: string;
2283
2476
  group: string;
@@ -2326,7 +2519,22 @@ type FocusedWeightedDerivedDataEdit<T, Weight> = {
2326
2519
  : never);
2327
2520
 
2328
2521
  export type EditComputedDataOptions = FocusedDerivedDataEdit<ComputedDataOptions>;
2329
- export type EditFilteredDataOptions = FocusedDerivedDataEdit<FilterDataOptions>;
2522
+ export type FilterRangePatch = FilterRangeClosure & {
2523
+ min?: FilterBound | false;
2524
+ max?: FilterBound | false;
2525
+ };
2526
+ type FilterModePatch =
2527
+ | { oneOf: readonly [DatasetScalar, ...DatasetScalar[]]; noneOf?: never; predicate?: never; range?: never }
2528
+ | { oneOf?: never; noneOf: readonly [DatasetScalar, ...DatasetScalar[]]; predicate?: never; range?: never }
2529
+ | { oneOf?: never; noneOf?: never; predicate: FilterComparison; range?: never }
2530
+ | { oneOf?: never; noneOf?: never; predicate?: never; range: FilterRangePatch }
2531
+ | { oneOf?: never; noneOf?: never; predicate?: never; range?: never };
2532
+ export type EditFilteredDataOptions = FilterModePatch & {
2533
+ target: string;
2534
+ field?: string;
2535
+ nulls?: "include" | "exclude" | false;
2536
+ dependents?: DerivedDataDependents;
2537
+ };
2330
2538
  export type EditFoldDataOptions = FocusedDerivedDataEdit<FoldDataOptions>;
2331
2539
  export type EditSummaryDataOptions = FocusedWeightedDerivedDataEdit<
2332
2540
  SummaryDataOptions,
@@ -2453,11 +2661,24 @@ export type BoxPlotPositionChannel =
2453
2661
  | BoxPlotCategoryChannel
2454
2662
  | BoxPlotMeasureChannel;
2455
2663
 
2456
- export type BoxPlotWhisker =
2664
+ export type BoxPlotWhisker = (
2457
2665
  | { type?: "tukey"; factor?: number }
2458
- | { type: "minmax"; factor?: never };
2666
+ | { type: "minmax"; factor?: never }
2667
+ ) & Pick<ErrorBarOptions, "caps" | "capSize" | "stroke" | "strokeWidth" | "strokeDash" | "opacity" |
2668
+ "lineCap" | "lineJoin" | "miterLimit">;
2669
+
2670
+ export interface BoxPlotSummaryFields {
2671
+ min: string;
2672
+ q1: string;
2673
+ median: string;
2674
+ q3: string;
2675
+ max: string;
2676
+ }
2677
+
2678
+ type BoxPlotWidth = { band?: number; pixels?: never } | { band?: never; pixels: number };
2459
2679
 
2460
2680
  export interface BoxPlotOptions {
2681
+ summary?: BoxPlotSummaryFields;
2461
2682
  id?: string;
2462
2683
  target?: string;
2463
2684
  data?: string;
@@ -2465,7 +2686,7 @@ export interface BoxPlotOptions {
2465
2686
  y?: BoxPlotPositionChannel;
2466
2687
  coordinate?: string;
2467
2688
  whisker?: BoxPlotWhisker;
2468
- width?: { band?: number };
2689
+ width?: BoxPlotWidth;
2469
2690
  outliers?: boolean;
2470
2691
  box?: RectStyleDetails & {
2471
2692
  fill?: string;
@@ -2474,6 +2695,7 @@ export interface BoxPlotOptions {
2474
2695
  strokeWidth?: number;
2475
2696
  };
2476
2697
  median?: StrokeStyleDetails & {
2698
+ width?: { pixels: number } | "auto";
2477
2699
  stroke?: string;
2478
2700
  strokeWidth?: number;
2479
2701
  };
@@ -2486,12 +2708,13 @@ export interface BoxPlotOptions {
2486
2708
  }
2487
2709
 
2488
2710
  export interface EditBoxPlotOptions {
2711
+ summary?: BoxPlotSummaryFields | false;
2489
2712
  target?: string;
2490
2713
  data?: string;
2491
2714
  x?: BoxPlotPositionChannel;
2492
2715
  y?: BoxPlotPositionChannel;
2493
2716
  whisker?: BoxPlotWhisker;
2494
- width?: { band?: number };
2717
+ width?: BoxPlotWidth;
2495
2718
  outliers?: boolean;
2496
2719
  box?: RectStyleDetails & {
2497
2720
  fill?: string;
@@ -2500,6 +2723,7 @@ export interface EditBoxPlotOptions {
2500
2723
  strokeWidth?: number;
2501
2724
  };
2502
2725
  median?: StrokeStyleDetails & {
2726
+ width?: { pixels: number } | "auto";
2503
2727
  stroke?: string;
2504
2728
  strokeWidth?: number;
2505
2729
  };
@@ -2588,7 +2812,7 @@ export type ViolinPlotColorOptions =
2588
2812
  };
2589
2813
 
2590
2814
  export interface ViolinPlotAreaOptions extends StrokeStyleDetails {
2591
- fill?: string;
2815
+ fill?: FillPaint;
2592
2816
  opacity?: number;
2593
2817
  stroke?: string;
2594
2818
  strokeWidth?: number;
@@ -2663,6 +2887,11 @@ type LineXPositionChannel =
2663
2887
  temporalUnit?: TemporalInputUnit;
2664
2888
  scale?: NonPointTemporalPositionScaleOptions;
2665
2889
  }
2890
+ | {
2891
+ fieldType: "nominal" | "ordinal";
2892
+ bin?: never;
2893
+ scale?: NonPointCategoricalPositionScaleOptions;
2894
+ }
2666
2895
  ));
2667
2896
  type LineYPositionChannel =
2668
2897
  | string
@@ -2688,13 +2917,14 @@ type BarYPositionChannel =
2688
2917
  | string
2689
2918
  | {
2690
2919
  field: string;
2920
+ bin?: never;
2691
2921
  fieldType: "temporal";
2692
2922
  temporalUnit?: TemporalInputUnit;
2693
2923
  aggregate?: never;
2694
2924
  stack?: never;
2695
2925
  scale?: NonPointTemporalPositionScaleOptions;
2696
2926
  }
2697
- | ({ field: string; stack?: StackMode } & (
2927
+ | ({ field: string; bin?: never; stack?: StackMode } & (
2698
2928
  | {
2699
2929
  fieldType?: "quantitative";
2700
2930
  aggregate?: never;
@@ -2729,7 +2959,7 @@ type BasicColorChannel =
2729
2959
  field: string;
2730
2960
  fieldType: "temporal";
2731
2961
  temporalUnit?: TemporalInputUnit;
2732
- scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
2962
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
2733
2963
  palette?: Palette;
2734
2964
  };
2735
2965
  type NonPointCategoricalColorChannel =
@@ -2794,14 +3024,10 @@ type RectColorChannel =
2794
3024
  field: string;
2795
3025
  fieldType: "temporal";
2796
3026
  temporalUnit?: TemporalInputUnit;
2797
- scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
3027
+ scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
2798
3028
  palette?: Palette;
2799
3029
  };
2800
- export type BasicSizeChannel = string | {
2801
- field: string;
2802
- fieldType?: "quantitative";
2803
- scale?: SizeScaleOptions;
2804
- };
3030
+ export type BasicSizeChannel = string | WithoutEncodingTarget<SizeEncodingOptions>;
2805
3031
  export type BasicShapeChannel = string | {
2806
3032
  field: string;
2807
3033
  fieldType?: "nominal";
@@ -2865,6 +3091,7 @@ export interface CreateScatterPlotOptions {
2865
3091
  x: PointFacadePositionChannel;
2866
3092
  y: PointFacadePositionChannel;
2867
3093
  color?: BasicColorChannel;
3094
+ stroke?: string | WithoutEncodingTarget<Extract<StrokeEncodingOptions, { field: string }>>;
2868
3095
  size?: BasicSizeChannel;
2869
3096
  shape?: BasicShapeChannel;
2870
3097
  point?: StrokeStyleDetails & {
@@ -3033,7 +3260,7 @@ type PolarLegendOrder = LegendValueOrder | { channel: "theta"; values?: never };
3033
3260
  type PolarPathLegendOptions = Omit<PathLegendOptions, "order"> & {
3034
3261
  order?: PolarLegendOrder;
3035
3262
  };
3036
- type PolarPointLegendOptions = Omit<FilledMarkLegendOptions, "order"> & {
3263
+ type PolarPointLegendOptions = DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & {
3037
3264
  order?: PolarLegendOrder;
3038
3265
  };
3039
3266
  export type PolarPathGuideOptions = Omit<PolarChartGuideOptions, "legend"> & {
@@ -3063,7 +3290,7 @@ export interface CreatePolarLinePlotOptions {
3063
3290
  color?: LineCategoricalColorChannel;
3064
3291
  groupBy?: string | readonly [string, ...string[]];
3065
3292
  strokeDash?: BasicStrokeDashChannel;
3066
- line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve"> & {
3293
+ line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve" | "tension"> & {
3067
3294
  curve?: "linear";
3068
3295
  closed?: boolean;
3069
3296
  };
@@ -3129,7 +3356,7 @@ export type CreateRadarPlotOptions = {
3129
3356
  ];
3130
3357
  color?: LineCategoricalColorChannel;
3131
3358
  strokeDash?: BasicStrokeDashChannel;
3132
- line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve"> & {
3359
+ line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve" | "tension"> & {
3133
3360
  curve?: "linear";
3134
3361
  closed?: true;
3135
3362
  };
@@ -3158,8 +3385,17 @@ export interface RugTickOptions extends StrokeStyleDetails {
3158
3385
  strokeWidth?: number;
3159
3386
  opacity?: number;
3160
3387
  }
3161
- export type RugGuideOptions = Omit<CartesianGuideOptions, "axes" | "legend"> & {
3388
+ type ContinuousGridDirectionOptions = Omit<GridDirectionOptions, "bandPosition"> & {
3389
+ /** Continuous position scales do not have categorical band edges. */
3390
+ bandPosition?: never;
3391
+ };
3392
+ type ContinuousCartesianGridOptions = {
3393
+ vertical?: boolean | ContinuousGridDirectionOptions;
3394
+ horizontal?: boolean | ContinuousGridDirectionOptions;
3395
+ };
3396
+ export type RugGuideOptions = Omit<CartesianGuideOptions, "axes" | "legend" | "grid"> & {
3162
3397
  axes?: false | CAxes;
3398
+ grid?: false | ContinuousCartesianGridOptions;
3163
3399
  legend?: false;
3164
3400
  };
3165
3401
  export type CreateRugPlotOptions = {
@@ -3323,6 +3559,7 @@ export type GroupEncodingOptions = { target?: string; fieldType?: "nominal" } &
3323
3559
  export interface SeriesLayoutOptions { target?: string; mode: ColorLayout; }
3324
3560
  export interface BasicSeriesLayoutOptions { target?: string; mode: Exclude<ColorLayout, "center">; }
3325
3561
  export type AreaPlotIndependentChannel = string | ({ field: string } & (
3562
+ | { fieldType: "nominal" | "ordinal"; scale?: NonPointCategoricalPositionScaleOptions }
3326
3563
  | { fieldType?: "quantitative"; scale?: NonPointQuantitativePositionScaleOptions }
3327
3564
  | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit; scale?: NonPointTemporalPositionScaleOptions }
3328
3565
  ));
@@ -3336,8 +3573,8 @@ export type CreateAreaPlotOptions = {
3336
3573
  groupBy?: string | readonly [string, ...string[]];
3337
3574
  layout?: Exclude<ColorLayout, "group">; missing?: "error" | "break";
3338
3575
  color?: string | { field: string; fieldType?: "nominal" | "ordinal"; scale?: NonPointCategoricalColorScaleOptions; palette?: Palette };
3339
- area?: StrokeStyleDetails & { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
3340
- guides?: false | DensityPlotGuideOptions;
3576
+ area?: StrokeStyleDetails & { fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
3577
+ guides?: false | (Omit<DensityPlotGuideOptions, "grid"> & { grid?: false | CartesianGridOptions });
3341
3578
  } & (
3342
3579
  | { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Exclude<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: number }
3343
3580
  | { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Extract<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: never }
@@ -3357,11 +3594,22 @@ export interface CreateLinePlotOptions {
3357
3594
  line?: StrokeStyleDetails & {
3358
3595
  strokeWidth?: number;
3359
3596
  curve?: CurveInterpolation;
3597
+ tension?: number;
3360
3598
  stroke?: string;
3361
3599
  opacity?: number;
3362
3600
  closed?: false;
3363
3601
  };
3364
- guides?: false | CPathGuides;
3602
+ guides?: false | (Omit<CPathGuides, "legend" | "grid"> & {
3603
+ grid?: false | (Omit<CartesianGridOptions, "horizontal"> & {
3604
+ horizontal?: boolean | (Omit<GridDirectionOptions, "bandPosition"> & {
3605
+ /** Line y is continuous; band positioning is available only for categorical x grids. */
3606
+ bandPosition?: never;
3607
+ });
3608
+ });
3609
+ legend?: false | (Omit<PathLegendOptions, "order"> & {
3610
+ order?: LegendValueOrder | { channel: "x"; values?: never };
3611
+ });
3612
+ });
3365
3613
  }
3366
3614
 
3367
3615
  type BasicHistogramEncoding =
@@ -3373,22 +3621,44 @@ type BasicHistogramEncoding =
3373
3621
  : never
3374
3622
  : never;
3375
3623
 
3376
- export interface CreateBarPlotOptions {
3624
+ export type BarRangePositionChannel = {
3625
+ lower: string;
3626
+ upper: string;
3627
+ fieldType?: "quantitative";
3628
+ scale?: NonPointZeroSupportingPositionScaleOptions;
3629
+ field?: never;
3630
+ aggregate?: never;
3631
+ stack?: never;
3632
+ };
3633
+ type BarFieldPosition<T> = T extends string ? T : T & { lower?: never; upper?: never };
3634
+ type BarRangeOppositePositionChannel = string | {
3635
+ field: string;
3636
+ fieldType?: "nominal" | "ordinal" | "temporal";
3637
+ temporalUnit?: TemporalInputUnit;
3638
+ scale?: NonPointBandPositionScaleOptions | NonPointTemporalPositionScaleOptions;
3639
+ bin?: never;
3640
+ aggregate?: never;
3641
+ stack?: never;
3642
+ };
3643
+ export type CreateBarPlotOptions = {
3377
3644
  id?: string;
3378
3645
  data?: string;
3379
3646
  coordinate?: string;
3380
- x: BandPositionChannel;
3381
- y: BarYPositionChannel;
3647
+ orientation?: "vertical" | "horizontal";
3382
3648
  color?: BarColorChannel;
3383
- width?: Omit<BarWidthOptions, "target">;
3649
+ width?: Omit<BarWidthOptions, "target" | "interval">;
3384
3650
  bar?: RectStyleDetails & {
3385
- fill?: string;
3651
+ fill?: FillPaint;
3386
3652
  opacity?: number;
3387
3653
  stroke?: FilledMarkStroke;
3388
3654
  strokeWidth?: number;
3389
3655
  };
3390
3656
  guides?: false | ColorGuides;
3391
- }
3657
+ } & (
3658
+ | { x: BarFieldPosition<BandPositionChannel>; y: BarFieldPosition<BarYPositionChannel> }
3659
+ | { x: BarRangePositionChannel; y: BarRangeOppositePositionChannel }
3660
+ | { x: BarRangeOppositePositionChannel; y: BarRangePositionChannel }
3661
+ );
3392
3662
 
3393
3663
  export type CreateHistogramOptions = BasicHistogramEncoding & {
3394
3664
  id?: string;
@@ -3397,7 +3667,7 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
3397
3667
  field: string;
3398
3668
  color?: HistogramCategoricalColorChannel;
3399
3669
  bar?: RectStyleDetails & {
3400
- fill?: string;
3670
+ fill?: FillPaint;
3401
3671
  opacity?: number;
3402
3672
  stroke?: FilledMarkStroke;
3403
3673
  strokeWidth?: number;
@@ -3407,7 +3677,7 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
3407
3677
 
3408
3678
  export type HorizonPlotGuideOptions = {
3409
3679
  axes?: false | (Omit<CAxes, "y"> & { y?: false });
3410
- grid?: false | (Pick<CartesianGridOptions, "vertical"> & { horizontal?: false });
3680
+ grid?: false | { vertical?: boolean | ContinuousGridDirectionOptions; horizontal?: false };
3411
3681
  legend?: false;
3412
3682
  };
3413
3683
  export interface CreateHorizonPlotOptions {
@@ -3429,7 +3699,8 @@ export interface CreateHorizonPlotOptions {
3429
3699
  }
3430
3700
 
3431
3701
  export type DensityPlotLegendOptions = Omit<PieLegendOptions, "order"> & { order?: LegendValueOrder };
3432
- export type DensityPlotGuideOptions = Omit<CCategoricalGuides, "legend"> & {
3702
+ export type DensityPlotGuideOptions = Omit<CCategoricalGuides, "legend" | "grid"> & {
3703
+ grid?: false | ContinuousCartesianGridOptions;
3433
3704
  legend?: false | DensityPlotLegendOptions;
3434
3705
  };
3435
3706
  export interface CreateDensityPlotOptions {
@@ -3455,7 +3726,7 @@ export interface CreateDensityPlotOptions {
3455
3726
  palette?: Palette;
3456
3727
  layout?: "overlay";
3457
3728
  };
3458
- area?: StrokeStyleDetails & { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
3729
+ area?: StrokeStyleDetails & { fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
3459
3730
  guides?: false | DensityPlotGuideOptions;
3460
3731
  }
3461
3732
 
@@ -3472,32 +3743,38 @@ export type PieColor = string | {
3472
3743
  };
3473
3744
  export type PieLegendOptions = Omit<
3474
3745
  FilledMarkLegendOptions,
3475
- "count" | "values" | "gradient" | "channels" | "order" | "labels"
3746
+ "count" | "values" | "gradient" | "channels" | "order" | "labels" | "representation" | "symbol"
3476
3747
  > & {
3748
+ symbol?: FilledLegendSymbolRecipe;
3477
3749
  channels?: readonly ["color"];
3478
3750
  order?: LegendValueOrder | { channel: "theta"; values?: never };
3479
3751
  labels?: CategoricalLegendTextOptions;
3480
3752
  };
3753
+ export type PieRadiusChannel = string | {
3754
+ scale?: RadiusScaleOptions;
3755
+ } & ({ field: string; aggregate?: "sum" } | { field?: never; aggregate: "count" });
3756
+
3481
3757
  export type CreatePiePlotOptions = {
3482
3758
  id?: string;
3483
3759
  data?: string;
3484
3760
  coordinate?: string;
3485
3761
  category: PieCategory;
3486
3762
  color?: false | PieColor;
3487
- arc?: StrokeStyleDetails & { innerRadius?: number; padAngle?: number; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
3763
+ radius?: PieRadiusChannel;
3764
+ arc?: StrokeStyleDetails & { innerRadius?: ArcInnerRadius; padAngle?: number; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
3488
3765
  guides?: false | { axes?: false; grid?: false; legend?: false | PieLegendOptions };
3489
- } & ({ value?: never; aggregate?: "count" } | { value: string; aggregate: "sum" });
3766
+ } & ({ value?: never; aggregate?: "count" } | { value: string; aggregate?: "sum" });
3490
3767
 
3491
3768
  export type MeasuredRadialGuideOptions = {
3492
3769
  axes?: false | CategoricalPolarAxesOptions;
3493
3770
  grid?: false | CategoricalPolarGridOptions;
3494
3771
  legend?: false | PieLegendOptions;
3495
3772
  };
3496
- export type CreateRosePlotOptions = Omit<CreatePiePlotOptions, "guides" | "arc" | "aggregate" | "value"> & {
3773
+ export type CreateRosePlotOptions = Omit<CreatePiePlotOptions, "guides" | "arc" | "aggregate" | "value" | "radius"> & {
3497
3774
  radiusScale?: MeasuredRadiusScaleOptions;
3498
- arc?: StrokeStyleDetails & { innerRadius?: number; padAngle?: 0; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
3775
+ arc?: StrokeStyleDetails & { innerRadius?: ArcInnerRadius; padAngle?: 0; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
3499
3776
  guides?: false | MeasuredRadialGuideOptions;
3500
- } & ({ value?: never; aggregate?: "count" } | { value: string; aggregate: "sum" });
3777
+ } & ({ value?: never; aggregate?: "count" } | { value: string; aggregate?: "sum" });
3501
3778
  export type CreateRadialBarPlotOptions = CreateRosePlotOptions;
3502
3779
 
3503
3780
  export interface HeatmapBaseOptions {
@@ -3524,7 +3801,7 @@ export interface PreGriddedHeatmapOptions extends HeatmapBaseOptions {
3524
3801
  x: HeatmapCategoryPositionChannel;
3525
3802
  y: HeatmapCategoryPositionChannel;
3526
3803
  bin?: never;
3527
- color: RectColorChannel;
3804
+ color?: RectColorChannel;
3528
3805
  }
3529
3806
 
3530
3807
  export interface BinnedHeatmapPositionChannel {
@@ -3597,7 +3874,7 @@ export interface ErrorBandOptions extends StrokeStyleDetails {
3597
3874
  y?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3598
3875
  groupBy?: string;
3599
3876
  coordinate?: string;
3600
- fill?: string;
3877
+ fill?: FillPaint;
3601
3878
  opacity?: number;
3602
3879
  curve?: CurveInterpolation;
3603
3880
  boundaries?: false | (StrokeStyleDetails & {
@@ -3615,7 +3892,7 @@ export interface EditErrorBandOptions extends StrokeStyleDetails {
3615
3892
  x?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3616
3893
  y?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3617
3894
  groupBy?: string | false;
3618
- fill?: string | false;
3895
+ fill?: FillPaint | false;
3619
3896
  opacity?: number;
3620
3897
  curve?: CurveInterpolation;
3621
3898
  statistics?: {
@@ -3685,11 +3962,18 @@ export interface YOffsetEncodingOptions extends OffsetEncodingOptions {}
3685
3962
  export type TextFormat = ValueFormat;
3686
3963
 
3687
3964
  export interface TextMarkOptions {
3965
+ /** Logical-pixel baseline spacing; defaults to 1.2 times fontSize. */
3966
+ lineHeight?: number;
3967
+ /** Anchor the first line or center the complete multiline block. */
3968
+ blockAlign?: "first" | "middle";
3969
+ /** Follow resolved source appearance; an explicit fill takes precedence. Source-owned labels only. */
3970
+ inheritColor?: "fill" | "stroke" | false;
3688
3971
  id?: string;
3689
3972
  data?: string;
3690
3973
  /** Explicit source mark. Mutually exclusive with data; may be incomplete. */
3691
3974
  source?: string;
3692
3975
  text?: unknown;
3976
+ missing?: "error" | "skip";
3693
3977
  fill?: string;
3694
3978
  opacity?: number;
3695
3979
  fontSize?: number;
@@ -3753,6 +4037,7 @@ export interface RemoveLabelLayoutOptions {
3753
4037
  export interface RectMarkOptions extends RectStyleDetails {
3754
4038
  id?: string;
3755
4039
  data?: string;
4040
+ missing?: "error" | "skip";
3756
4041
  fill?: string;
3757
4042
  opacity?: number;
3758
4043
  stroke?: string | false;
@@ -3816,6 +4101,18 @@ type AnnotationBaseOptions = Omit<TextMarkOptions, "id" | "data" | "source" | "t
3816
4101
 
3817
4102
  type AnnotationAnchor =
3818
4103
  | {
4104
+ anchor: "plot-center";
4105
+ x?: never;
4106
+ y?: never;
4107
+ space?: never;
4108
+ source?: never;
4109
+ align?: never;
4110
+ baseline?: never;
4111
+ data?: string;
4112
+ coordinate?: string;
4113
+ }
4114
+ | {
4115
+ anchor?: never;
3819
4116
  x?: never;
3820
4117
  y?: never;
3821
4118
  space?: never;
@@ -3824,6 +4121,7 @@ type AnnotationAnchor =
3824
4121
  coordinate?: never;
3825
4122
  }
3826
4123
  | {
4124
+ anchor?: never;
3827
4125
  x: unknown;
3828
4126
  y: unknown;
3829
4127
  space?: "data";
@@ -3832,6 +4130,7 @@ type AnnotationAnchor =
3832
4130
  coordinate?: never;
3833
4131
  }
3834
4132
  | {
4133
+ anchor?: never;
3835
4134
  x: number;
3836
4135
  y: number;
3837
4136
  space: "plot";
@@ -3842,9 +4141,30 @@ type AnnotationAnchor =
3842
4141
 
3843
4142
  export type CreateAnnotationOptions = AnnotationBaseOptions & AnnotationAnchor;
3844
4143
 
4144
+ type TextPlotPositionChannel =
4145
+ | string
4146
+ | ({ field: string } & PositionScaleBranches<
4147
+ NonPointQuantitativePositionScaleOptions,
4148
+ NonPointTemporalPositionScaleOptions,
4149
+ NonPointCategoricalPositionScaleOptions>)
4150
+ | WithoutEncodingTarget<Extract<DatumPositionEncodingOptions, { datum: unknown }>> & { coordinate?: never };
4151
+
4152
+ export interface CreateTextPlotOptions {
4153
+ id?: string;
4154
+ data?: string;
4155
+ coordinate?: string;
4156
+ x: TextPlotPositionChannel;
4157
+ y: TextPlotPositionChannel;
4158
+ text: string | WithoutEncodingTarget<Extract<TextEncodingOptions, { field: string } | { value: unknown }>>;
4159
+ color?: RectColorChannel;
4160
+ style?: Omit<TextMarkOptions, "id" | "data" | "source" | "text" | "inheritColor">;
4161
+ guides?: false | ColorGuides;
4162
+ }
4163
+
3845
4164
  export type BarWidthOptions = { target?: string } & (
3846
- | { band?: number; pixels?: never }
3847
- | { band?: never; pixels: number }
4165
+ | { band?: number; pixels?: never; interval?: never }
4166
+ | { band?: never; pixels: number; interval?: never }
4167
+ | { band?: never; pixels?: never; interval: { unit: Exclude<TimeUnit, "week" | "weekday">; insetStart?: number; insetEnd?: number } }
3848
4168
  );
3849
4169
 
3850
4170
  export interface DashScaleOptions {
@@ -3873,7 +4193,9 @@ export type StrokeDashEncodingOptions =
3873
4193
  export type NonPointContinuousColorScaleOptions = ScaleFields<
3874
4194
  "id" | "interpolate" | "midpoint" | "clamp" | "reverse"
3875
4195
  > & {
3876
- type?: "sequential";
4196
+ type?: "sequential" | "log" | "sqrt" | "symlog";
4197
+ base?: number;
4198
+ constant?: number;
3877
4199
  domain?: "auto" | readonly [unknown, unknown];
3878
4200
  range?: "auto" | readonly [string, string, ...string[]];
3879
4201
  palette?: PaletteName | {
@@ -3937,7 +4259,7 @@ export type ColorEncodingOptions =
3937
4259
  fieldType: "temporal";
3938
4260
  temporalUnit?: TemporalInputUnit;
3939
4261
  aggregate?: never;
3940
- scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
4262
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3941
4263
  palette?: Palette;
3942
4264
  layout?: never;
3943
4265
  };
@@ -4060,9 +4382,10 @@ export type StrokeWidthEncodingOptions =
4060
4382
  export type SizeEncodingOptions = {
4061
4383
  field: string;
4062
4384
  target?: string;
4063
- fieldType?: "quantitative";
4064
- scale?: SizeScaleOptions;
4065
- };
4385
+ } & (
4386
+ | { fieldType?: "quantitative"; scale?: SizeScaleOptions }
4387
+ | { fieldType: "nominal" | "ordinal"; scale?: CategoricalSizeScaleOptions }
4388
+ );
4066
4389
 
4067
4390
  export type ShapeEncodingOptions = {
4068
4391
  field: string;
@@ -4157,28 +4480,35 @@ type RegressionParameterOptions =
4157
4480
  method?: "linear";
4158
4481
  degree?: never;
4159
4482
  span?: never;
4483
+ robustIterations?: never;
4160
4484
  confidenceMethod?: ConfidenceIntervalMethod;
4161
4485
  level?: number;
4162
4486
  confidence?: number;
4163
- interval?: RegressionInterval;
4487
+ interval?: RegressionInterval | false;
4488
+ predict?: RegressionPredictOptions;
4164
4489
  }
4165
4490
  | {
4166
4491
  method: "polynomial";
4167
4492
  degree?: number;
4168
4493
  span?: never;
4494
+ robustIterations?: never;
4169
4495
  confidenceMethod?: ConfidenceIntervalMethod;
4170
4496
  level?: number;
4171
4497
  confidence?: number;
4172
- interval?: RegressionInterval;
4498
+ interval?: RegressionInterval | false;
4499
+ predict?: RegressionPredictOptions;
4173
4500
  }
4174
4501
  | {
4175
4502
  method: "loess";
4176
4503
  degree?: never;
4177
4504
  span?: number;
4505
+ /** Residual reweighting passes, integer 0..32; default 0. */
4506
+ robustIterations?: number;
4178
4507
  confidenceMethod?: never;
4179
4508
  level?: never;
4180
4509
  confidence?: never;
4181
4510
  interval?: never;
4511
+ predict?: RegressionPredictOptions;
4182
4512
  };
4183
4513
 
4184
4514
  export type RegressionDataOptions = {
@@ -4187,6 +4517,7 @@ export type RegressionDataOptions = {
4187
4517
  x: string;
4188
4518
  y: string;
4189
4519
  groupBy?: string;
4520
+ missing?: "error" | "drop";
4190
4521
  } & RegressionParameterOptions;
4191
4522
 
4192
4523
  type RegressionCommonOptions = {
@@ -4195,6 +4526,8 @@ type RegressionCommonOptions = {
4195
4526
  y?: string;
4196
4527
  groupBy?: string | false;
4197
4528
  line?: StrokeStyleDetails & { strokeWidth?: number; curve?: CurveInterpolation };
4529
+ sourceBinding?: "fixed" | "follow";
4530
+ missing?: "error" | "drop";
4198
4531
  };
4199
4532
 
4200
4533
  export type RegressionOptions = RegressionCommonOptions & (
@@ -4218,12 +4551,16 @@ export interface EditRegressionOptions {
4218
4551
  method?: RegressionMethod;
4219
4552
  degree?: number;
4220
4553
  span?: number;
4554
+ robustIterations?: number;
4221
4555
  confidenceMethod?: ConfidenceIntervalMethod;
4222
4556
  level?: number;
4223
4557
  confidence?: number;
4224
- interval?: RegressionInterval;
4558
+ interval?: RegressionInterval | false;
4559
+ missing?: "error" | "drop";
4560
+ predict?: RegressionPredictOptions | false;
4225
4561
  band?: false | RegressionBandOptions;
4226
4562
  line?: StrokeStyleDetails & { strokeWidth?: number; curve?: CurveInterpolation };
4563
+ sourceBinding?: "fixed" | "follow";
4227
4564
  }
4228
4565
 
4229
4566
  export interface RemoveAxisOptions {
@@ -4263,6 +4600,8 @@ export interface LegendTextOptions {
4263
4600
  }
4264
4601
 
4265
4602
  export interface LegendTitleStyleOptions {
4603
+ /** Align a top title inside its measured content block; omission keeps native layout defaults. */
4604
+ align?: "left" | "center" | "right";
4266
4605
  color?: string;
4267
4606
  fontSize?: number;
4268
4607
  fontFamily?: string;
@@ -4308,32 +4647,45 @@ export type LegendOrder = LegendValueOrder |
4308
4647
  { channel: "x" | "y" | "theta"; values?: never };
4309
4648
 
4310
4649
  export interface LegendOptions {
4650
+ /** Continuous color only. Omission creates the existing gradient; symbols samples the same scale without changing marks. */
4651
+ representation?: "gradient" | "symbols";
4311
4652
  /** Categorical, interval, size, or stroke-width layout. Defaults to edge; legacy-bottom is categorical and requires bottom position. */
4312
4653
  layout?: "edge" | "legacy-bottom";
4654
+ /** Categorical and ordinal-size display limit; omitted or false shows every item. */
4655
+ overflow?: false | { maxItems: number; summary?: "ellipsis-count" };
4313
4656
  /** Categorical item order; preserves the appearance scale's assignments. */
4314
4657
  order?: LegendOrder;
4315
4658
  target?: string;
4316
4659
  /** Exact requested content; omission infers encoded point color/shape/size. Explicit subsets include size only when listed. */
4317
4660
  channels?: readonly ("color" | "stroke" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
4318
- position?: "right" | "left" | "bottom" | "top";
4661
+ /** Outside right/left: complete legend stack top aligns with the plot top, including borders and excluding chart titles. */
4662
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
4663
+ /** Arrange every legend block owned by the selected target. Item direction and columns remain independent. */
4664
+ blockLayout?: "row" | "column" | "wrap";
4665
+ /** Occupied group top-left relative to the plot. Cannot be supplied with position, align, or offset in the same call. */
4666
+ at?: { x: number; y: number };
4319
4667
  /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
4320
4668
  align?: "left" | "center" | "right";
4321
4669
  /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
4322
4670
  direction?: "horizontal" | "vertical";
4323
- /** Categorical sides allow omission or 1; multiple columns require a horizontal edge. */
4671
+ /** Categorical legends accept a positive column count on every supported position. */
4324
4672
  columns?: number;
4325
4673
  /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
4326
4674
  offset?: number;
4327
4675
  titlePosition?: "top" | "left";
4328
- title?: string;
4329
- /** Exact ascending samples for continuous size, opacity, or stroke-width legends. Cannot be combined with count. */
4676
+ /** false hides the title while retaining its inferred field text. */
4677
+ /** LF, CRLF and CR preserve explicit title lines, including blank lines. */
4678
+ title?: string | false;
4679
+ /** Exact ascending samples for continuous size, opacity, stroke-width, or color with representation symbols. Cannot be combined with count. */
4330
4680
  values?: readonly number[];
4331
4681
  count?: number;
4332
- gradient?: { length?: number; thickness?: number };
4682
+ /** Body-only opacity defaults to 1; edits preserve omitted fields. */
4683
+ gradient?: { length?: number; thickness?: number; opacity?: number };
4333
4684
  symbol?: LegendSymbolRecipe;
4334
4685
  labels?: LegendTextOptions;
4335
4686
  /** New categorical+size blocks share typography on every edge; retained standalone size styles remain independent. */
4336
4687
  titleStyle?: LegendTitleStyleOptions;
4688
+ /** Vertical items default to 18 logical pixels; the pitch grows to fit samples and labels. */
4337
4689
  itemGap?: number;
4338
4690
  border?: boolean | LegendBorderOptions;
4339
4691
  }
@@ -4366,11 +4718,17 @@ export interface EditLegendBlockOptions {
4366
4718
  gap?: number;
4367
4719
  text?: LegendBlockTextPatch;
4368
4720
  symbol?: LegendBlockSymbolPatch;
4721
+ /** An empty mapped label omits only text; its category and symbol remain. */
4369
4722
  labelMap?: DisplayLabelMap | "auto";
4370
4723
  }
4371
4724
 
4725
+ export interface LegendTitleStyleEditOptions extends Omit<LegendTitleStyleOptions, "align"> {
4726
+ align?: "left" | "center" | "right" | "auto";
4727
+ }
4728
+
4372
4729
  export interface EditLegendOptions
4373
- extends Omit<LegendOptions, "title" | "values"> {
4730
+ extends Omit<LegendOptions, "title" | "values" | "titleStyle"> {
4731
+ titleStyle?: LegendTitleStyleEditOptions;
4374
4732
  /** Exact final content set for the whole target; omission preserves content. */
4375
4733
  channels?: LegendOptions["channels"];
4376
4734
  title?: string | "auto" | false;
@@ -4381,16 +4739,22 @@ export interface EditLegendOptions
4381
4739
  export interface EditLegendLayoutOptions {
4382
4740
  target?: string;
4383
4741
  layout?: "edge" | "legacy-bottom";
4384
- position?: "right" | "left" | "bottom" | "top";
4742
+ /** Outside right/left: complete legend stack top aligns with the plot top, including borders and excluding chart titles. */
4743
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
4744
+ /** Opt into whole-target legend group layout; a requested row never wraps. */
4745
+ blockLayout?: "row" | "column" | "wrap";
4746
+ /** Move the complete occupied group top-left to plot-relative logical pixels. A later position clears this anchor. */
4747
+ at?: { x: number; y: number };
4385
4748
  /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
4386
4749
  align?: "left" | "center" | "right";
4387
4750
  /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
4388
4751
  direction?: "horizontal" | "vertical";
4389
- /** Categorical sides allow omission or 1; multiple columns require a horizontal edge. */
4752
+ /** Categorical legends accept a positive column count on every supported position. */
4390
4753
  columns?: number;
4391
4754
  /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
4392
4755
  offset?: number;
4393
4756
  titlePosition?: "top" | "left";
4757
+ /** Explicit spacing override; vertical creation defaults to 18 logical pixels. */
4394
4758
  itemGap?: number;
4395
4759
  }
4396
4760
 
@@ -4398,7 +4762,7 @@ export interface EditLegendLabelsOptions extends LegendTextOptions {
4398
4762
  target?: string;
4399
4763
  }
4400
4764
 
4401
- export interface EditLegendTitleOptions extends LegendTitleStyleOptions {
4765
+ export interface EditLegendTitleOptions extends LegendTitleStyleEditOptions {
4402
4766
  target?: string;
4403
4767
  title?: string | "auto" | false;
4404
4768
  }
@@ -4407,7 +4771,7 @@ export interface EditLegendSymbolsOptions {
4407
4771
  target?: string;
4408
4772
  symbol?: LegendSymbolRecipe;
4409
4773
  count?: number;
4410
- gradient?: { length?: number; thickness?: number };
4774
+ gradient?: { length?: number; thickness?: number; opacity?: number };
4411
4775
  }
4412
4776
 
4413
4777
  export interface EditLegendBorderOptions {
@@ -4425,6 +4789,7 @@ export interface EditAxisOptions<P extends string> {
4425
4789
  }
4426
4790
 
4427
4791
  export interface TitleTextStyleOptions {
4792
+ fontStyle?: "normal" | "italic";
4428
4793
  color?: string;
4429
4794
  fontSize?: number;
4430
4795
  fontFamily?: string;
@@ -4468,11 +4833,15 @@ export interface RemoveCategoryOrderOptions {
4468
4833
  }
4469
4834
 
4470
4835
  export interface TitleOptions {
4836
+ /** Explicit hard lines are retained; blank lines reserve spacing without painted text. */
4471
4837
  text: string;
4838
+ /** Multiline subtitle with at least one non-empty hard line. */
4472
4839
  subtitle?: string;
4473
4840
  position?: "top" | "bottom" | "left" | "right";
4474
4841
  align?: "left" | "center" | "right";
4475
4842
  offset?: number;
4843
+ /** Signed logical-pixel shift along the selected edge; defaults to zero. */
4844
+ alongOffset?: number;
4476
4845
  gap?: number;
4477
4846
  maxWidth?: number;
4478
4847
  wrap?: "word" | "character";
@@ -4497,6 +4866,7 @@ type StoredCell<T> = T extends (...args: never[]) => unknown ? never
4497
4866
  export interface CreateDataOptions<Row extends object> {
4498
4867
  id?: string;
4499
4868
  values: readonly (Row extends readonly unknown[] ? never : Row & StoredCell<Row>)[];
4869
+ schema?: SourceSchemaInput;
4500
4870
  }
4501
4871
 
4502
4872
  export interface ReviseDataOptions<Row extends object> extends CreateDataOptions<Row> {
@@ -4552,6 +4922,7 @@ export class ChartProgram {
4552
4922
  createTimeUnitData(options: TimeUnitDataOptions): ChartProgram;
4553
4923
  createWindowData(options: WindowDataOptions): ChartProgram;
4554
4924
  createBin2DData(options: Bin2DDataOptions): ChartProgram;
4925
+ createSortedData(options: SortedDataOptions): ChartProgram;
4555
4926
  editDerivedData(options: EditDerivedDataOptions): ChartProgram;
4556
4927
  editComputedData(options: EditComputedDataOptions): ChartProgram;
4557
4928
  editFilteredData(options: EditFilteredDataOptions): ChartProgram;
@@ -4563,6 +4934,7 @@ export class ChartProgram {
4563
4934
  editDensityData(options: EditDensityDataOptions): ChartProgram;
4564
4935
  editStackData(options: EditStackDataOptions): ChartProgram;
4565
4936
  editRegressionData(options: EditRegressionDataOptions): ChartProgram;
4937
+ editSortedData(options: EditSortedDataOptions): ChartProgram;
4566
4938
  editIntervalData(options: EditIntervalDataOptions): ChartProgram;
4567
4939
  editECDFData(options: EditECDFDataOptions): ChartProgram;
4568
4940
  editNormalizedData(options: EditNormalizedDataOptions): ChartProgram;
@@ -4573,6 +4945,7 @@ export class ChartProgram {
4573
4945
  createPointMark(options?: StrokeStyleDetails & {
4574
4946
  id?: string;
4575
4947
  data?: string;
4948
+ missing?: "error" | "skip";
4576
4949
  shape?: PointShape;
4577
4950
  fill?: string;
4578
4951
  opacity?: number;
@@ -4581,6 +4954,7 @@ export class ChartProgram {
4581
4954
  }): ChartProgram;
4582
4955
  editPointMark(options: StrokeStyleDetails & {
4583
4956
  target?: string;
4957
+ missing?: "error" | "skip";
4584
4958
  shape?: PointShape;
4585
4959
  fill?: string;
4586
4960
  opacity?: number;
@@ -4590,6 +4964,7 @@ export class ChartProgram {
4590
4964
  createTickMark(options?: StrokeStyleDetails & {
4591
4965
  id?: string;
4592
4966
  data?: string;
4967
+ missing?: "error" | "skip";
4593
4968
  length?: number;
4594
4969
  stroke?: string;
4595
4970
  strokeWidth?: number;
@@ -4597,6 +4972,7 @@ export class ChartProgram {
4597
4972
  }): ChartProgram;
4598
4973
  editTickMark(options: StrokeStyleDetails & {
4599
4974
  target?: string;
4975
+ missing?: "error" | "skip";
4600
4976
  length?: number;
4601
4977
  stroke?: string;
4602
4978
  strokeWidth?: number;
@@ -4611,6 +4987,7 @@ export class ChartProgram {
4611
4987
  data?: string;
4612
4988
  strokeWidth?: number;
4613
4989
  curve?: CurveInterpolation;
4990
+ tension?: number;
4614
4991
  stroke?: string;
4615
4992
  opacity?: number;
4616
4993
  closed?: boolean;
@@ -4619,6 +4996,7 @@ export class ChartProgram {
4619
4996
  target?: string;
4620
4997
  strokeWidth?: number;
4621
4998
  curve?: CurveInterpolation;
4999
+ tension?: number;
4622
5000
  stroke?: string;
4623
5001
  opacity?: number;
4624
5002
  closed?: boolean;
@@ -4626,14 +5004,17 @@ export class ChartProgram {
4626
5004
  createBarMark(options?: RectStyleDetails & {
4627
5005
  id?: string;
4628
5006
  data?: string;
4629
- fill?: string;
5007
+ orientation?: "vertical" | "horizontal";
5008
+ missing?: "error" | "skip";
5009
+ fill?: FillPaint;
4630
5010
  opacity?: number;
4631
5011
  stroke?: FilledMarkStroke;
4632
5012
  strokeWidth?: number;
4633
5013
  }): ChartProgram;
4634
5014
  editBarMark(options: RectStyleDetails & {
4635
5015
  target?: string;
4636
- fill?: string;
5016
+ missing?: "error" | "skip";
5017
+ fill?: FillPaint;
4637
5018
  opacity?: number;
4638
5019
  stroke?: FilledMarkStroke;
4639
5020
  strokeWidth?: number;
@@ -4641,7 +5022,7 @@ export class ChartProgram {
4641
5022
  createAreaMark(options?: StrokeStyleDetails & {
4642
5023
  id?: string;
4643
5024
  data?: string;
4644
- fill?: string;
5025
+ fill?: FillPaint;
4645
5026
  opacity?: number;
4646
5027
  stroke?: string;
4647
5028
  strokeWidth?: number;
@@ -4651,7 +5032,7 @@ export class ChartProgram {
4651
5032
  createArcMark(options?: StrokeStyleDetails & {
4652
5033
  id?: string;
4653
5034
  data?: string;
4654
- innerRadius?: number;
5035
+ innerRadius?: ArcInnerRadius;
4655
5036
  padAngle?: number;
4656
5037
  fill?: string;
4657
5038
  opacity?: number;
@@ -4660,7 +5041,7 @@ export class ChartProgram {
4660
5041
  }): ChartProgram;
4661
5042
  editArcMark(options: StrokeStyleDetails & {
4662
5043
  target?: string;
4663
- innerRadius?: number;
5044
+ innerRadius?: ArcInnerRadius;
4664
5045
  padAngle?: number;
4665
5046
  fill?: string;
4666
5047
  opacity?: number;
@@ -4669,9 +5050,10 @@ export class ChartProgram {
4669
5050
  }): ChartProgram;
4670
5051
  createRectMark(options?: RectMarkOptions): ChartProgram;
4671
5052
  editRectMark(options: EditRectMarkOptions): ChartProgram;
4672
- createRuleMark(options?: { id?: string; data?: string } & RuleStyleOptions): ChartProgram;
4673
- editRuleMark(options: { target?: string } & RuleStyleOptions): ChartProgram;
5053
+ createRuleMark(options?: { id?: string; data?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
5054
+ editRuleMark(options: { target?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
4674
5055
  createTextMark(options?: TextMarkOptions): ChartProgram;
5056
+ createTextPlot(options: CreateTextPlotOptions): ChartProgram;
4675
5057
  createMarkLabels(options?: CreateMarkLabelsOptions): ChartProgram;
4676
5058
  editMarkLabelSelection(options: EditMarkLabelSelectionOptions): ChartProgram;
4677
5059
  editMarkLabelPlacement(options: EditMarkLabelPlacementOptions): ChartProgram;
@@ -4684,7 +5066,7 @@ export class ChartProgram {
4684
5066
  removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
4685
5067
  editAreaMark(options: StrokeStyleDetails & {
4686
5068
  target?: string;
4687
- fill?: string;
5069
+ fill?: FillPaint;
4688
5070
  opacity?: number;
4689
5071
  stroke?: string | false;
4690
5072
  strokeWidth?: number;
@@ -4843,7 +5225,7 @@ export class ChartProgram {
4843
5225
  editRadialGrid(options: EditPolarGridOptions): ChartProgram;
4844
5226
  editGrid(options: EditGridDirectionsOptions): ChartProgram;
4845
5227
  removeGrid(options?: RemoveGridOptions): ChartProgram;
4846
- /** Combined categorical and size legends support all four edges with layout "edge". */
5228
+ /** Combined categorical and size legends support all four edges and plot corners with layout "edge". */
4847
5229
  createLegend(options?: LegendOptions): ChartProgram;
4848
5230
  editLegend(options: EditLegendOptions): ChartProgram;
4849
5231
  editLegendBlock(options: EditLegendBlockOptions): ChartProgram;