ggaction 0.0.12 → 0.0.13

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 (281) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +2 -2
  3. package/knowledge/action-card.schema.json +1 -1
  4. package/knowledge/action-cards.json +1 -1
  5. package/knowledge/action-cards.schema.json +1 -1
  6. package/knowledge/extension-authoring.md +2 -1
  7. package/knowledge/intent-taxonomy.json +1 -1
  8. package/knowledge/mcp-resources.json +1 -1
  9. package/knowledge/task-resolver.js +1 -1
  10. package/package.json +4 -2
  11. package/src/actions/basic.js +2 -0
  12. package/src/actions/boxPlots/materialize.js +2 -1
  13. package/src/actions/canvas/actions.js +3 -1
  14. package/src/actions/canvas/fitting.js +211 -0
  15. package/src/actions/canvas/index.js +2 -0
  16. package/src/actions/categoryOrder/index.js +3 -2
  17. package/src/actions/charts/area.js +47 -0
  18. package/src/actions/charts/bar.js +11 -5
  19. package/src/actions/charts/beeswarm.js +70 -0
  20. package/src/actions/charts/density.js +44 -0
  21. package/src/actions/charts/ecdf.js +183 -0
  22. package/src/actions/charts/endpoints.js +451 -0
  23. package/src/actions/charts/heatmap.js +2 -2
  24. package/src/actions/charts/histogram.js +1 -1
  25. package/src/actions/charts/horizon.js +71 -0
  26. package/src/actions/charts/index.js +37 -0
  27. package/src/actions/charts/interval-regression.js +169 -0
  28. package/src/actions/charts/line.js +5 -5
  29. package/src/actions/charts/parallel.js +1 -1
  30. package/src/actions/charts/pie.js +44 -0
  31. package/src/actions/charts/polar.js +123 -0
  32. package/src/actions/charts/radar.js +299 -0
  33. package/src/actions/charts/radial.js +42 -0
  34. package/src/actions/charts/raincloud.js +422 -0
  35. package/src/actions/charts/rug-strip.js +279 -0
  36. package/src/actions/charts/scatter.js +9 -3
  37. package/src/actions/charts/shared.js +69 -10
  38. package/src/actions/composition/actions.js +118 -1
  39. package/src/actions/data/bin.js +29 -0
  40. package/src/actions/data/computed.js +24 -0
  41. package/src/actions/data/derived.js +66 -0
  42. package/src/actions/data/ecdf.js +38 -0
  43. package/src/actions/data/filter.js +212 -28
  44. package/src/actions/data/fold.js +24 -0
  45. package/src/actions/data/index.js +24 -0
  46. package/src/actions/data/interval.js +2 -0
  47. package/src/actions/data/intervalEdit.js +86 -4
  48. package/src/actions/data/regression.js +5 -2
  49. package/src/actions/data/stack.js +26 -0
  50. package/src/actions/data/summary.js +26 -0
  51. package/src/actions/data/timeUnit.js +1 -1
  52. package/src/actions/encodings/appearance.js +32 -13
  53. package/src/actions/encodings/barWidth.js +8 -0
  54. package/src/actions/encodings/basic.js +2 -0
  55. package/src/actions/encodings/color/continuous.js +19 -59
  56. package/src/actions/encodings/color/index.js +28 -22
  57. package/src/actions/encodings/color/layout.js +3 -97
  58. package/src/actions/encodings/color/policy.js +5 -8
  59. package/src/actions/encodings/density/resolve.js +37 -5
  60. package/src/actions/encodings/density.js +120 -33
  61. package/src/actions/encodings/horizon/resolve.js +8 -4
  62. package/src/actions/encodings/horizon.js +18 -8
  63. package/src/actions/encodings/index.js +2 -0
  64. package/src/actions/encodings/offset.js +10 -16
  65. package/src/actions/encodings/parallel.js +2 -8
  66. package/src/actions/encodings/position/apply.js +10 -4
  67. package/src/actions/encodings/position/index.js +43 -5
  68. package/src/actions/encodings/position/policies/arc.js +14 -0
  69. package/src/actions/encodings/position/policies/area.js +4 -42
  70. package/src/actions/encodings/position/policies/bar.js +48 -13
  71. package/src/actions/encodings/position/resolve.js +67 -22
  72. package/src/actions/encodings/ranged.js +123 -97
  73. package/src/actions/encodings/remove.js +37 -32
  74. package/src/actions/encodings/ruleAppearance.js +23 -9
  75. package/src/actions/encodings/seriesLayout.js +104 -0
  76. package/src/actions/encodings/shared.js +25 -23
  77. package/src/actions/encodings/strokeDash.js +9 -6
  78. package/src/actions/encodings/temporal.js +7 -0
  79. package/src/actions/encodings/text.js +30 -15
  80. package/src/actions/errorBands/create.js +18 -5
  81. package/src/actions/errorBands/edit.js +341 -21
  82. package/src/actions/errorBars/create.js +21 -10
  83. package/src/actions/errorBars/edit.js +355 -19
  84. package/src/actions/facets/actions.js +410 -12
  85. package/src/actions/facets/derive.js +57 -8
  86. package/src/actions/gradientPlots/components.js +33 -11
  87. package/src/actions/gradientPlots/materialize.js +5 -7
  88. package/src/actions/guides/applicability.js +20 -17
  89. package/src/actions/guides/axes/axes.js +4 -3
  90. package/src/actions/guides/axes/axis.js +18 -18
  91. package/src/actions/guides/axes/components.js +43 -0
  92. package/src/actions/guides/axes/edit.js +16 -51
  93. package/src/actions/guides/axes/labels.js +129 -19
  94. package/src/actions/guides/axes/lines.js +7 -5
  95. package/src/actions/guides/axes/parallel/lifecycle.js +117 -0
  96. package/src/actions/guides/axes/parallel/policy.js +137 -0
  97. package/src/actions/guides/axes/parallel/resolve.js +44 -23
  98. package/src/actions/guides/axes/parallel.js +93 -217
  99. package/src/actions/guides/axes/policy.js +21 -67
  100. package/src/actions/guides/axes/tickGroups.js +14 -8
  101. package/src/actions/guides/axes/ticks.js +5 -4
  102. package/src/actions/guides/axes/titles.js +21 -8
  103. package/src/actions/guides/basic.js +2 -0
  104. package/src/actions/guides/facade.js +106 -0
  105. package/src/actions/guides/facadeAxes.js +200 -0
  106. package/src/actions/guides/facadeLegend.js +63 -0
  107. package/src/actions/guides/grids/grid.js +37 -33
  108. package/src/actions/guides/grids/resolve.js +10 -2
  109. package/src/actions/guides/guides.js +35 -28
  110. package/src/actions/guides/legends/categorical/actions.js +193 -249
  111. package/src/actions/guides/legends/categorical/components.js +4 -5
  112. package/src/actions/guides/legends/categorical/layout.js +36 -349
  113. package/src/actions/guides/legends/categorical/options.js +30 -14
  114. package/src/actions/guides/legends/categorical/recipes.js +14 -0
  115. package/src/actions/guides/legends/categorical/resolve.js +21 -10
  116. package/src/actions/guides/legends/categorical/symbols.js +2 -3
  117. package/src/actions/guides/legends/continuous/common.js +69 -14
  118. package/src/actions/guides/legends/continuous/gradient.js +111 -83
  119. package/src/actions/guides/legends/continuous/index.js +6 -2
  120. package/src/actions/guides/legends/continuous/interval.js +71 -92
  121. package/src/actions/guides/legends/continuous/opacity.js +105 -84
  122. package/src/actions/guides/legends/creation.js +27 -0
  123. package/src/actions/guides/legends/edit.js +198 -66
  124. package/src/actions/guides/legends/focused.js +2 -2
  125. package/src/actions/guides/legends/lane.js +98 -86
  126. package/src/actions/guides/legends/lifecycle.js +132 -0
  127. package/src/actions/guides/legends/remove.js +31 -76
  128. package/src/actions/guides/legends/size.js +149 -105
  129. package/src/actions/guides/legends/strokeWidth.js +106 -64
  130. package/src/actions/guides/legends/target.js +12 -0
  131. package/src/actions/guides/legends/transition.js +43 -0
  132. package/src/actions/guides/polar/axes/facade.js +77 -62
  133. package/src/actions/guides/polar/axes/labels.js +5 -4
  134. package/src/actions/guides/polar/axes/lines.js +2 -1
  135. package/src/actions/guides/polar/axes/shared.js +6 -0
  136. package/src/actions/guides/polar/axes/ticks.js +5 -4
  137. package/src/actions/guides/polar/axes/titles.js +5 -4
  138. package/src/actions/guides/polar/grids.js +7 -7
  139. package/src/actions/guides/reuse.js +44 -0
  140. package/src/actions/guides/tickValues.js +19 -21
  141. package/src/actions/index.js +2 -0
  142. package/src/actions/intervals/resolve.js +35 -15
  143. package/src/actions/marks/arc/actions.js +1 -1
  144. package/src/actions/marks/area/actions.js +18 -4
  145. package/src/actions/marks/area/materialize.js +5 -2
  146. package/src/actions/marks/bar/materialize.js +11 -7
  147. package/src/actions/marks/index.js +5 -0
  148. package/src/actions/marks/line/actions.js +43 -108
  149. package/src/actions/marks/line/materialize.js +34 -52
  150. package/src/actions/marks/point/edit.js +11 -15
  151. package/src/actions/marks/point/index.js +1 -0
  152. package/src/actions/marks/point/jitter.js +3 -0
  153. package/src/actions/marks/point/materialize.js +106 -2
  154. package/src/actions/marks/point/packing.js +68 -0
  155. package/src/actions/marks/references.js +87 -0
  156. package/src/actions/marks/remove.js +17 -4
  157. package/src/actions/marks/rule/actions.js +34 -3
  158. package/src/actions/marks/rule/appearance.js +26 -0
  159. package/src/actions/marks/shared.js +12 -12
  160. package/src/actions/marks/text/actions.js +224 -6
  161. package/src/actions/marks/text/layout.js +2 -2
  162. package/src/actions/primitives/createGraphics.js +3 -1
  163. package/src/actions/primitives/semantic.js +1 -1
  164. package/src/actions/primitives/semanticAction.js +39 -2
  165. package/src/actions/primitives/semanticValidation/guide.js +10 -0
  166. package/src/actions/primitives/semanticValidation/layer.js +18 -1
  167. package/src/actions/primitives/semanticValidation/scale.js +10 -1
  168. package/src/actions/regression/create.js +1 -1
  169. package/src/actions/regression/edit.js +19 -6
  170. package/src/actions/regression/resolve.js +1 -1
  171. package/src/actions/scales/consumers/common.js +20 -53
  172. package/src/actions/scales/consumers/families.js +27 -14
  173. package/src/actions/scales/consumers/index.js +23 -2
  174. package/src/actions/scales/consumers/seriesLayout.js +33 -2
  175. package/src/actions/scales/create.js +4 -4
  176. package/src/actions/scales/definitions.js +19 -3
  177. package/src/actions/scales/edit.js +46 -34
  178. package/src/actions/scales/editPolicy.js +21 -31
  179. package/src/actions/scales/materialize.js +10 -46
  180. package/src/actions/scales/patch.js +1 -1
  181. package/src/actions/scales/preview.js +39 -0
  182. package/src/actions/scales/quantitativeColor.js +9 -5
  183. package/src/actions/theme/actions.js +43 -0
  184. package/src/actions/theme/index.js +9 -0
  185. package/src/actions/theme/reconcile.js +882 -0
  186. package/src/actions/titles/actions.js +11 -10
  187. package/src/actions/titles/resolve.js +1 -40
  188. package/src/actions/violinPlots/create.js +86 -42
  189. package/src/actions/violinPlots/edit.js +191 -0
  190. package/src/actions/violinPlots/index.js +2 -0
  191. package/src/core/ChartProgram.js +7 -0
  192. package/src/core/action.js +22 -2
  193. package/src/core/compositionState.js +136 -8
  194. package/src/grammar/aggregate.js +66 -23
  195. package/src/grammar/arcs.js +58 -1
  196. package/src/grammar/areaEndpoints.js +46 -0
  197. package/src/grammar/areaSeries.js +87 -41
  198. package/src/grammar/bars/aggregate.js +33 -12
  199. package/src/grammar/bars/policy.js +9 -7
  200. package/src/grammar/bin.js +181 -0
  201. package/src/grammar/categoryOrder.js +34 -0
  202. package/src/grammar/computed.js +150 -0
  203. package/src/grammar/ecdf.js +198 -0
  204. package/src/grammar/facets/index.js +117 -6
  205. package/src/grammar/fold.js +123 -0
  206. package/src/grammar/horizon.js +6 -4
  207. package/src/grammar/interval.js +37 -20
  208. package/src/grammar/lineSeries.js +20 -63
  209. package/src/grammar/markFilter.js +22 -4
  210. package/src/grammar/markLabels.js +93 -0
  211. package/src/grammar/parallelAxisTitles.js +16 -0
  212. package/src/grammar/pathSeries.js +91 -0
  213. package/src/grammar/pointPacking.js +183 -0
  214. package/src/grammar/positionDatum.js +12 -0
  215. package/src/grammar/rects.js +9 -1
  216. package/src/grammar/regression/derive.js +4 -0
  217. package/src/grammar/regression/index.js +7 -2
  218. package/src/grammar/regression/models.js +22 -7
  219. package/src/grammar/regression/parameters.js +40 -13
  220. package/src/grammar/rotation.js +29 -0
  221. package/src/grammar/rules.js +7 -21
  222. package/src/grammar/scales/color.js +23 -1
  223. package/src/grammar/scales/colorConsumers.js +38 -0
  224. package/src/grammar/scales/definition.js +15 -1
  225. package/src/grammar/scales/discretized.js +11 -5
  226. package/src/grammar/scales/fields.js +38 -8
  227. package/src/grammar/scales/mapping.js +2 -0
  228. package/src/grammar/scales/radial.js +55 -0
  229. package/src/grammar/scales/types.js +1 -0
  230. package/src/grammar/schemas/semanticPath.js +17 -3
  231. package/src/grammar/stack.js +170 -0
  232. package/src/grammar/statistics/confidenceInterval.js +101 -0
  233. package/src/grammar/summary.js +183 -0
  234. package/src/grammar/text.js +22 -16
  235. package/src/grammar/timeUnit.js +21 -11
  236. package/src/grammar/transformTopology.js +6 -0
  237. package/src/grammar/transforms.js +36 -0
  238. package/src/grammar/valueFormat.js +112 -0
  239. package/src/grammar/window.js +13 -7
  240. package/src/layout/facets.js +41 -7
  241. package/src/layout/guideCollisions.js +12 -0
  242. package/src/layout/legend.js +2 -10
  243. package/src/layout/legendItems.js +102 -0
  244. package/src/layout/legendLane.js +100 -11
  245. package/src/materialization/bars/aggregate.js +38 -152
  246. package/src/materialization/bars/histogram.js +24 -0
  247. package/src/materialization/categorySlotOffset.js +40 -0
  248. package/src/materialization/compositionSnapshot.js +1 -1
  249. package/src/materialization/dependencies.js +57 -16
  250. package/src/materialization/encodings.js +1 -1
  251. package/src/materialization/facets.js +8 -1
  252. package/src/materialization/guides/layout.js +57 -0
  253. package/src/materialization/guides/resources.js +2 -2
  254. package/src/materialization/legends.js +10 -1
  255. package/src/materialization/marks/capabilities.js +20 -5
  256. package/src/materialization/marks/grouping.js +52 -0
  257. package/src/materialization/marks/index.js +58 -23
  258. package/src/materialization/marks/policies.js +2 -0
  259. package/src/materialization/rect.js +33 -33
  260. package/src/materialization/rowEncoding.js +13 -13
  261. package/src/materialization/scaleGuideDependencies.js +8 -5
  262. package/src/materialization/scales/map.js +1 -0
  263. package/src/materialization/scales/policies/arc.js +42 -0
  264. package/src/materialization/scales/policies/binnedPosition.js +7 -4
  265. package/src/materialization/scales/policies/series.js +2 -1
  266. package/src/materialization/scales/resolve.js +46 -14
  267. package/src/materialization/selection/compatibility.js +11 -0
  268. package/src/materialization/selection/items/bar.js +12 -68
  269. package/src/materialization/selection/items/common.js +8 -2
  270. package/src/materialization/selection/items/path.js +3 -13
  271. package/src/materialization/selection/items/rect.js +7 -4
  272. package/src/materialization/text.js +64 -5
  273. package/src/mcp/adapter.js +2 -2
  274. package/src/selectors/datasets.js +13 -0
  275. package/src/selectors/layers.js +3 -2
  276. package/src/selectors/scales.js +6 -0
  277. package/src/theme/defaults.js +39 -0
  278. package/types/basic.d.ts +11 -2
  279. package/types/index.d.ts +126 -0
  280. package/types/program.d.ts +1320 -135
  281. package/src/materialization/bars/grouped.js +0 -144
@@ -1,5 +1,10 @@
1
1
  import type { RegisteredExtensionActions } from "./extension.js";
2
2
 
3
+ export type TemporalInputUnit = "auto" | "year" | "timestamp";
4
+ export type ThemeName = "light" | "dark";
5
+ export interface ApplyThemeOptions {
6
+ theme: ThemeName;
7
+ }
3
8
  export type FieldType = "quantitative" | "temporal" | "ordinal" | "nominal";
4
9
  export type GraphicType =
5
10
  | "canvas"
@@ -41,6 +46,7 @@ export interface LinearGradientPaint {
41
46
  ];
42
47
  }
43
48
  export type FillPaint = string | LinearGradientPaint;
49
+ type FilledMarkStroke = string | false;
44
50
  export type CurveInterpolation =
45
51
  | "linear"
46
52
  | "step"
@@ -65,6 +71,20 @@ export interface JitterPointsOptions {
65
71
  export interface RemoveJitterOptions {
66
72
  target?: string;
67
73
  }
74
+ export type PointPackingMaxOffset =
75
+ | { pixels: number; band?: never }
76
+ | { pixels?: never; band: number };
77
+ export interface PackPointsOptions {
78
+ target?: string;
79
+ channel: "x" | "y";
80
+ maxOffset?: PointPackingMaxOffset;
81
+ padding?: number;
82
+ key?: string;
83
+ overflow?: "error" | "overlap";
84
+ }
85
+ export interface RemovePointPackingOptions {
86
+ target?: string;
87
+ }
68
88
  export type ScaleType =
69
89
  | "linear"
70
90
  | "log"
@@ -108,6 +128,16 @@ export interface ReplaceCompositionChildOptions {
108
128
  target: string;
109
129
  program: ChartProgram;
110
130
  }
131
+ export interface InsertCompositionChildOptions {
132
+ id: string;
133
+ program: ChartProgram;
134
+ before?: string;
135
+ after?: string;
136
+ }
137
+ export interface RemoveCompositionChildOptions { target: string; }
138
+ export interface ReorderCompositionChildrenOptions {
139
+ order: readonly [string, ...string[]];
140
+ }
111
141
  export type FacetScaleResolution = "shared" | "independent";
112
142
  export interface FacetScaleResolutions {
113
143
  x?: FacetScaleResolution;
@@ -128,6 +158,35 @@ export interface FacetOptions {
128
158
  id?: string;
129
159
  field: string;
130
160
  data?: string;
161
+ values?: readonly DatasetScalar[];
162
+ columns?: number;
163
+ gap?: number;
164
+ align?: CompositionAlign;
165
+ padding?: number | CompositionPadding;
166
+ scales?: FacetScaleResolutions;
167
+ guides?: FacetGuideOptions;
168
+ }
169
+ export interface FacetGridRole {
170
+ field: string;
171
+ values?: readonly DatasetScalar[];
172
+ }
173
+ export interface FacetGridOptions {
174
+ id?: string;
175
+ data?: string;
176
+ rows: FacetGridRole;
177
+ columns: FacetGridRole;
178
+ combinations?: "observed" | "full";
179
+ gap?: number;
180
+ align?: CompositionAlign;
181
+ padding?: number | CompositionPadding;
182
+ scales?: FacetScaleResolutions;
183
+ guides?: FacetGuideOptions;
184
+ }
185
+ export interface RepeatChartsOptions {
186
+ id?: string;
187
+ target?: string;
188
+ channel: "x" | "y";
189
+ fields: readonly [string, ...string[]];
131
190
  columns?: number;
132
191
  gap?: number;
133
192
  align?: CompositionAlign;
@@ -135,6 +194,7 @@ export interface FacetOptions {
135
194
  scales?: FacetScaleResolutions;
136
195
  guides?: FacetGuideOptions;
137
196
  }
197
+ export interface EditFacetSourceOptions { program: ChartProgram; }
138
198
  export interface EditFacetHeadersOptions {
139
199
  fontSize?: number;
140
200
  fontFamily?: string;
@@ -160,8 +220,26 @@ export interface FacetCompositionSpec {
160
220
  readonly padding: Readonly<Required<CompositionPadding>>;
161
221
  readonly facet: {
162
222
  readonly data: string;
163
- readonly field: string;
223
+ readonly field?: string;
164
224
  readonly values: readonly DatasetScalar[];
225
+ readonly grid?: {
226
+ readonly rows: { readonly field: string; readonly values: readonly DatasetScalar[] };
227
+ readonly columns: { readonly field: string; readonly values: readonly DatasetScalar[] };
228
+ readonly combinations: "observed" | "full";
229
+ readonly cells: readonly {
230
+ readonly id: string;
231
+ readonly row: number;
232
+ readonly column: number;
233
+ readonly rowValue: DatasetScalar;
234
+ readonly columnValue: DatasetScalar;
235
+ readonly empty: boolean;
236
+ }[];
237
+ };
238
+ readonly repeat?: {
239
+ readonly target: string;
240
+ readonly channel: "x" | "y";
241
+ readonly fields: readonly string[];
242
+ };
165
243
  readonly scales: Readonly<Required<FacetScaleResolutions>>;
166
244
  readonly guides: {
167
245
  readonly axes: "each" | "outer";
@@ -238,22 +316,28 @@ export type DatasetRegressionTransform = {
238
316
  } & (
239
317
  | {
240
318
  method: "linear";
241
- confidence: number;
242
319
  interval: "mean" | "prediction";
243
320
  degree?: never;
244
321
  span?: never;
245
- }
322
+ } & (
323
+ | { confidenceMethod: ConfidenceIntervalMethod; level: number; confidence?: never }
324
+ | { confidence: number; confidenceMethod?: never; level?: never }
325
+ )
246
326
  | {
247
327
  method: "polynomial";
248
328
  degree: number;
249
- confidence: number;
250
329
  interval: "mean" | "prediction";
251
330
  span?: never;
252
- }
331
+ } & (
332
+ | { confidenceMethod: ConfidenceIntervalMethod; level: number; confidence?: never }
333
+ | { confidence: number; confidenceMethod?: never; level?: never }
334
+ )
253
335
  | {
254
336
  method: "loess";
255
337
  span: number;
256
338
  degree?: never;
339
+ confidenceMethod?: never;
340
+ level?: never;
257
341
  confidence?: never;
258
342
  interval?: never;
259
343
  }
@@ -304,10 +388,10 @@ export interface HorizonOutputFields {
304
388
  }
305
389
  export interface DatasetHorizonTransform {
306
390
  readonly type: "horizon";
307
- readonly x: {
308
- readonly field: string;
309
- readonly fieldType: "quantitative" | "temporal";
310
- };
391
+ readonly x: { readonly field: string } & (
392
+ | { readonly fieldType: "quantitative"; readonly temporalUnit?: never }
393
+ | { readonly fieldType: "temporal"; readonly temporalUnit?: TemporalInputUnit }
394
+ );
311
395
  readonly y: {
312
396
  readonly field: string;
313
397
  readonly fieldType: "quantitative";
@@ -346,16 +430,19 @@ export type DatasetIntervalTransform = {
346
430
  | {
347
431
  center: "mean";
348
432
  extent: "stderr" | "stdev";
433
+ method?: never;
349
434
  level?: never;
350
435
  }
351
436
  | {
352
437
  center: "mean";
353
438
  extent: "ci";
439
+ method?: ConfidenceIntervalMethod;
354
440
  level: number;
355
441
  }
356
442
  | {
357
443
  center: "median";
358
444
  extent: "iqr";
445
+ method?: never;
359
446
  level?: never;
360
447
  }
361
448
  );
@@ -416,6 +503,27 @@ export interface DatasetWindowTransform {
416
503
  readonly sortBy: readonly DatasetWindowSort[];
417
504
  readonly operations: readonly DatasetWindowOperation[];
418
505
  }
506
+ export interface ECDFOutputFields {
507
+ value: string;
508
+ cumulative: string;
509
+ probability: string;
510
+ }
511
+ export interface DatasetECDFResolvedGroup {
512
+ readonly keys: Readonly<Record<string, string | number | boolean>>;
513
+ readonly denominator: number;
514
+ readonly validCount: number;
515
+ }
516
+ export interface DatasetECDFTransform {
517
+ readonly type: "ecdf";
518
+ readonly field: string;
519
+ readonly groupBy: readonly string[];
520
+ readonly weight?: string;
521
+ readonly missing: "drop" | "error";
522
+ readonly as: Readonly<ECDFOutputFields>;
523
+ readonly resolved?: {
524
+ readonly groups: readonly DatasetECDFResolvedGroup[];
525
+ };
526
+ }
419
527
  export type TimeUnit =
420
528
  | "year"
421
529
  | "quarter"
@@ -428,6 +536,7 @@ export interface DatasetTimeUnitTransform {
428
536
  readonly type: "timeUnit";
429
537
  readonly field: string;
430
538
  readonly unit: TimeUnit;
539
+ readonly temporalUnit?: TemporalInputUnit;
431
540
  readonly as: string;
432
541
  }
433
542
  export interface Bin2DCounts {
@@ -479,13 +588,83 @@ export interface DatasetBin2DTransform {
479
588
  readonly occupiedCount: number;
480
589
  };
481
590
  }
591
+ export interface DatasetBinTransform {
592
+ readonly type: "bin";
593
+ readonly field: string;
594
+ readonly bin:
595
+ | { readonly maxBins: number }
596
+ | { readonly step: number }
597
+ | { readonly boundaries: readonly [number, number, ...number[]] };
598
+ readonly extent: "auto" | readonly [number, number];
599
+ readonly nice: boolean;
600
+ readonly zero: boolean;
601
+ readonly includeEmpty: boolean;
602
+ readonly members: boolean;
603
+ readonly as: {
604
+ readonly lower: string;
605
+ readonly upper: string;
606
+ readonly count: string;
607
+ readonly members?: string;
608
+ };
609
+ readonly resolved?: {
610
+ readonly domain: readonly [number, number];
611
+ readonly step?: number;
612
+ readonly boundaries: readonly [number, number, ...number[]];
613
+ };
614
+ }
615
+ export interface DatasetFoldTransform {
616
+ readonly type: "fold";
617
+ readonly fields: readonly string[];
618
+ readonly as: {
619
+ readonly key: string;
620
+ readonly value: string;
621
+ };
622
+ }
623
+ export type ComputedExpression =
624
+ | { readonly field: string }
625
+ | { readonly constant: number }
626
+ | {
627
+ readonly op: "negate" | "absolute";
628
+ readonly operand: ComputedExpression;
629
+ }
630
+ | {
631
+ readonly op: "add" | "subtract" | "multiply" | "divide";
632
+ readonly left: ComputedExpression;
633
+ readonly right: ComputedExpression;
634
+ };
635
+ export interface DatasetComputedTransform {
636
+ readonly type: "computed";
637
+ readonly as: string;
638
+ readonly expression: ComputedExpression;
639
+ }
640
+ export type StackDataMode = "stack" | "fill" | "center" | "diverging";
641
+ export interface StackDataOutputFields {
642
+ start?: string;
643
+ end?: string;
644
+ value?: string;
645
+ share?: string;
646
+ }
647
+ export interface DatasetStackTransform {
648
+ readonly type: "stack";
649
+ readonly category: string;
650
+ readonly group: string;
651
+ readonly value: string;
652
+ readonly mode: StackDataMode;
653
+ readonly as: Required<StackDataOutputFields>;
654
+ }
482
655
  export type DatasetTransform =
656
+ | DatasetBinTransform
483
657
  | DatasetBin2DTransform
658
+ | DatasetComputedTransform
484
659
  | DatasetFilterTransform
660
+ | DatasetFoldTransform
485
661
  | DatasetRegressionTransform
486
662
  | DatasetDensityTransform
663
+ | DatasetECDFTransform
487
664
  | DatasetHorizonTransform
488
665
  | DatasetIntervalTransform
666
+ | DatasetSummaryTransform
667
+ | DatasetStackTransform
489
668
  | DatasetTimeUnitTransform
490
669
  | DatasetWindowTransform;
491
670
  export interface CreateDerivedDataOptions {
@@ -493,6 +672,28 @@ export interface CreateDerivedDataOptions {
493
672
  source: string;
494
673
  transform: readonly [DatasetTransform];
495
674
  }
675
+ export interface DatasetSummaryTransform {
676
+ type: "summary";
677
+ groupBy: readonly string[];
678
+ aggregates: readonly SummaryAggregateOptions[];
679
+ members?: string;
680
+ }
681
+ export interface SummaryAggregateOptions {
682
+ op: AggregateOperation;
683
+ field?: string;
684
+ as: string;
685
+ }
686
+ export interface SummaryDataOptions {
687
+ id: string;
688
+ source?: string;
689
+ groupBy?: string | readonly string[];
690
+ aggregates: readonly SummaryAggregateOptions[];
691
+ members?: string;
692
+ }
693
+ export interface BindMarkDataOptions {
694
+ target: string;
695
+ data: string;
696
+ }
496
697
  export type MarkGraphicProperty =
497
698
  | "x" | "y" | "width" | "height" | "radius"
498
699
  | "x1" | "y1" | "x2" | "y2"
@@ -501,7 +702,7 @@ export type MarkSelector = {
501
702
  grain?: "item" | "stack";
502
703
  } & (
503
704
  | { field: string; channel?: never; property?: never }
504
- | { channel: "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset" | "theta" | "radius" | "color" | "strokeDash" | "size" | "shape" | "group" | "opacity"; field?: never; property?: never }
705
+ | { channel: "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset" | "theta" | "radius" | "color" | "strokeDash" | "strokeWidth" | "size" | "shape" | "group" | "opacity"; field?: never; property?: never }
505
706
  | { property: MarkGraphicProperty; field?: never; channel?: never }
506
707
  ) & (
507
708
  | { op: "eq" | "neq" | "gt" | "gte" | "lt" | "lte"; value: unknown }
@@ -531,7 +732,11 @@ export interface RemoveMarkSelectionOptions {
531
732
  }
532
733
  export type FilterMarksOptions = {
533
734
  target?: string;
735
+ mode?: "replace" | "compose";
534
736
  } & MarkSelector;
737
+ export interface RemoveMarkFilterOptions {
738
+ target?: string;
739
+ }
535
740
  export interface HighlightMarksOptions {
536
741
  id?: string;
537
742
  target?: string;
@@ -561,12 +766,18 @@ export type ScalarAggregateOperation =
561
766
  | "distinct" | "valid" | "missing"
562
767
  | "variance" | "varianceP" | "stdev" | "stdevP" | "stderr"
563
768
  | "q1" | "q3" | "ciLower" | "ciUpper";
769
+ export type ConfidenceIntervalMethod = "normal" | "student-t";
564
770
  export type ParameterizedAggregateOperation =
565
771
  | { op: "quantile"; probability: number }
566
772
  | {
567
773
  op: "first" | "last";
568
774
  orderBy: string;
569
775
  order?: "ascending" | "descending";
776
+ }
777
+ | {
778
+ op: "ciLower" | "ciUpper";
779
+ method?: ConfidenceIntervalMethod;
780
+ level?: number;
570
781
  };
571
782
  export type AggregateOperation =
572
783
  | ScalarAggregateOperation
@@ -651,7 +862,8 @@ export interface SemanticLayer {
651
862
  readonly data?: string;
652
863
  readonly source?: string;
653
864
  readonly coordinate?: string;
654
- readonly mark?: Readonly<{ type?: string; [key: string]: unknown }>;
865
+ readonly mark?: Readonly<{ type?: string; missing?: "error" | "break"; [key: string]: unknown }>;
866
+ readonly layout?: Readonly<{ mode?: ColorLayout }>;
655
867
  readonly encoding?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
656
868
  readonly [key: string]: unknown;
657
869
  }
@@ -705,16 +917,32 @@ export interface CanvasOptions {
705
917
  margin?: number | Partial<Record<"top" | "right" | "bottom" | "left", number>>;
706
918
  }
707
919
 
920
+ export interface FitCanvasOptions {
921
+ /** Minimum fitted margin on every Canvas edge. Defaults to 0. */
922
+ padding?: number;
923
+ /** Required final plot width. Defaults to 160. */
924
+ minPlotWidth?: number;
925
+ /** Required final plot height. Defaults to 120. */
926
+ minPlotHeight?: number;
927
+ /** Maximum binary-search probes per edge. Defaults to 32; maximum 64. */
928
+ iterationLimit?: number;
929
+ /** Reject an unsatisfied fit or preserve it with a structured overflow result. */
930
+ overflow?: "error" | "report";
931
+ }
932
+
708
933
  export type XAxisPosition = "bottom" | "top";
709
934
  export type YAxisPosition = "left" | "right";
935
+ export type RotationUnit = "radians" | "degrees";
936
+ export type RotationInput = number | { value: number; unit: RotationUnit };
937
+ type ValueFormatDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
938
+ type ValueFormatPrecision = ValueFormatDigit | 10 | 11 | 12 | `0${ValueFormatDigit}`;
710
939
  type TimeAxisDirective = "Y" | "m" | "d" | "b";
711
- export type AxisFormatString =
712
- | ".0f" | ".1f" | ".2f"
713
- | ".0%" | ".1%" | ".2e"
714
- | `${string}%${TimeAxisDirective}${string}`;
940
+ export type NumericFormatString = `.${ValueFormatPrecision}${"f" | "%" | "e"}`;
941
+ export type UtcFormatString = `${string}%${TimeAxisDirective}${string}`;
942
+ export type ValueFormat = "auto" | NumericFormatString | UtcFormatString;
943
+ export type AxisFormatString = NumericFormatString | UtcFormatString;
715
944
  export type AxisFormat =
716
- | "auto"
717
- | AxisFormatString
945
+ | ValueFormat
718
946
  | { decimals: number };
719
947
  export type AxisValue = string | boolean | number;
720
948
  export interface AxisLineStyleOptions {
@@ -732,13 +960,23 @@ export interface AxisLabelStyleOptions {
732
960
  fontFamily?: string;
733
961
  fontWeight?: string | number;
734
962
  }
963
+ export interface AxisLabelLayoutOptions {
964
+ /** Legacy numbers are radians; structured values make radians or degrees explicit. */
965
+ rotation?: RotationInput;
966
+ /** Wrap each label to this measured width; false removes an existing wrap policy. */
967
+ maxWidth?: number | false;
968
+ wrap?: "word" | "character";
969
+ lineHeight?: number;
970
+ /** Defaults to error; allow stores an intentional label-label overlap policy. */
971
+ overlap?: "error" | "allow";
972
+ }
735
973
  export interface AxisTicksAndLabelsOptions<P extends string> {
736
974
  scale?: string;
737
975
  position?: P;
738
976
  count?: number;
739
977
  values?: readonly AxisValue[];
740
978
  ticks?: AxisTickStyleOptions;
741
- labels?: AxisLabelStyleOptions;
979
+ labels?: AxisLabelStyleOptions & AxisLabelLayoutOptions;
742
980
  }
743
981
  export interface AxisTitleOptions<P extends string> {
744
982
  text?: string;
@@ -746,7 +984,7 @@ export interface AxisTitleOptions<P extends string> {
746
984
  position?: P;
747
985
  at?: "start" | "center" | "end" | number;
748
986
  offset?: number;
749
- rotation?: number;
987
+ rotation?: RotationInput;
750
988
  color?: string;
751
989
  fontSize?: number;
752
990
  fontFamily?: string;
@@ -756,9 +994,9 @@ export interface CompleteAxisOptions<P extends string> {
756
994
  scale?: string;
757
995
  coordinate?: string;
758
996
  position?: P;
759
- line?: AxisLineStyleOptions;
760
- ticksAndLabels?: Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
761
- title?: Omit<AxisTitleOptions<P>, "scale" | "position">;
997
+ line?: false | AxisLineStyleOptions;
998
+ ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
999
+ title?: false | Omit<AxisTitleOptions<P>, "scale" | "position">;
762
1000
  }
763
1001
  export interface CreateAxesOptions {
764
1002
  coordinate?: {
@@ -778,13 +1016,43 @@ export interface AxisTickOptions<P extends string>
778
1016
  values?: readonly AxisValue[];
779
1017
  }
780
1018
  export interface AxisLabelOptions<P extends string>
781
- extends AxisLabelStyleOptions {
1019
+ extends AxisLabelStyleOptions, AxisLabelLayoutOptions {
782
1020
  scale?: string;
783
1021
  position?: P;
784
1022
  count?: number;
785
1023
  values?: readonly AxisValue[];
786
1024
  }
787
1025
 
1026
+ export type ParallelAxisTickSelection =
1027
+ | { count?: number; values?: never }
1028
+ | { values: readonly AxisValue[]; count?: never };
1029
+ export type ParallelAxisTicksOptions = AxisTickStyleOptions & ParallelAxisTickSelection;
1030
+ export type ParallelAxisLabelsOptions = AxisLabelStyleOptions & ParallelAxisTickSelection;
1031
+ export interface ParallelAxisTitleOptions {
1032
+ text?: string;
1033
+ offset?: number;
1034
+ color?: string;
1035
+ fontSize?: number;
1036
+ fontFamily?: string;
1037
+ fontWeight?: string | number;
1038
+ }
1039
+ export type ParallelAxisComponentsOptions = {
1040
+ field: string;
1041
+ target?: string;
1042
+ line?: false | AxisLineStyleOptions;
1043
+ title?: false | ParallelAxisTitleOptions;
1044
+ } & (
1045
+ | { ticksAndLabels?: false | (ParallelAxisTickSelection & {
1046
+ ticks?: AxisTickStyleOptions; labels?: AxisLabelStyleOptions;
1047
+ }); ticks?: never; labels?: never }
1048
+ | { ticks?: false | ParallelAxisTicksOptions; labels?: false | ParallelAxisLabelsOptions;
1049
+ ticksAndLabels?: never }
1050
+ );
1051
+ export type CreateParallelAxisOptions = ParallelAxisComponentsOptions;
1052
+ export type EditParallelAxisOptions = ParallelAxisComponentsOptions;
1053
+ export interface ParallelAxesOptions { target?: string; coordinate?: string; }
1054
+ export interface RemoveParallelAxisOptions { field: string; target?: string; }
1055
+
788
1056
  export interface PolarGuideResourceOptions {
789
1057
  scale?: string;
790
1058
  coordinate?: string;
@@ -815,26 +1083,44 @@ export interface PolarTitleOptions {
815
1083
  export interface RadialTitleOptions extends PolarTitleOptions {
816
1084
  position?: "inside" | "outside";
817
1085
  }
818
- export interface CompletePolarAxisOptions extends PolarGuideResourceOptions {
819
- line?: AxisLineStyleOptions;
820
- ticksAndLabels?: PolarTicksAndLabelsOptions;
1086
+ export type PolarAxisTickSelection =
1087
+ | { count?: number; values?: never }
1088
+ | { values: readonly AxisValue[]; count?: never };
1089
+ export type CreateThetaAxisLineOptions = AxisLineStyleOptions &
1090
+ Omit<PolarGuideResourceOptions, "angle">;
1091
+ export type CreateRadialAxisLineOptions = AxisLineStyleOptions & PolarGuideResourceOptions;
1092
+ export type CreateThetaAxisTicksOptions = Omit<PolarTickOptions, "count" | "values"> &
1093
+ PolarAxisTickSelection & Omit<PolarGuideResourceOptions, "angle">;
1094
+ export type CreateRadialAxisTicksOptions = Omit<PolarTickOptions, "count" | "values"> &
1095
+ PolarAxisTickSelection & PolarGuideResourceOptions;
1096
+ export type CreateThetaAxisLabelsOptions = Omit<PolarLabelOptions, "count" | "values"> &
1097
+ PolarAxisTickSelection & Omit<PolarGuideResourceOptions, "angle">;
1098
+ export type CreateRadialAxisLabelsOptions = Omit<PolarLabelOptions, "count" | "values"> &
1099
+ PolarAxisTickSelection & PolarGuideResourceOptions;
1100
+ export type CreateThetaAxisTitleOptions = PolarTitleOptions &
1101
+ Omit<PolarGuideResourceOptions, "angle">;
1102
+ export type CreateRadialAxisTitleOptions = RadialTitleOptions & PolarGuideResourceOptions;
1103
+ export interface CompletePolarAxisOptions extends Omit<PolarGuideResourceOptions, "angle"> {
1104
+ line?: false | AxisLineStyleOptions;
1105
+ ticksAndLabels?: false | PolarTicksAndLabelsOptions;
821
1106
  title?: false | PolarTitleOptions;
822
1107
  }
823
1108
  export interface CompleteRadialAxisOptions
824
1109
  extends Omit<CompletePolarAxisOptions, "title"> {
1110
+ angle?: number;
825
1111
  title?: false | RadialTitleOptions;
826
1112
  }
827
1113
  export interface EditPolarAxisOptions {
828
1114
  angle?: number;
829
- line?: AxisLineStyleOptions;
830
- ticks?: PolarTickOptions;
831
- labels?: PolarLabelOptions;
832
- ticksAndLabels?: PolarTicksAndLabelsOptions;
833
- title?: PolarTitleOptions;
1115
+ line?: false | AxisLineStyleOptions;
1116
+ ticks?: false | PolarTickOptions;
1117
+ labels?: false | PolarLabelOptions;
1118
+ ticksAndLabels?: false | PolarTicksAndLabelsOptions;
1119
+ title?: false | PolarTitleOptions;
834
1120
  }
835
1121
  export interface EditRadialAxisOptions
836
1122
  extends Omit<EditPolarAxisOptions, "title"> {
837
- title?: RadialTitleOptions;
1123
+ title?: false | RadialTitleOptions;
838
1124
  }
839
1125
 
840
1126
  export interface GridDirectionOptions {
@@ -895,11 +1181,42 @@ type CartesianAxesOptions = Omit<
895
1181
  coordinate?: { id?: string; type?: "auto" | "cartesian" };
896
1182
  };
897
1183
  type CartesianGridOptions = Pick<CreateGridOptions, "horizontal" | "vertical">;
1184
+ type FilledMarkLegendOptions = Omit<LegendOptions, "symbol"> & {
1185
+ symbol?: "auto"
1186
+ | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
1187
+ | { layers: readonly LegendSymbolLayer[] };
1188
+ };
1189
+ type CategoricalLegendTextOptions = {
1190
+ offset?: number;
1191
+ color?: string;
1192
+ fontSize?: number;
1193
+ fontFamily?: string;
1194
+ fontWeight?: string | number;
1195
+ format?: "auto";
1196
+ };
1197
+ type PathLegendOptions = Omit<LegendOptions, "symbol" | "gradient" | "count" | "labels"> & {
1198
+ symbol?: "auto" | { length?: number; lineWidth?: number }
1199
+ | { layers: readonly LegendSymbolLayer[] };
1200
+ labels?: CategoricalLegendTextOptions;
1201
+ };
898
1202
  type CartesianGuideOptions = {
899
1203
  axes?: false | CartesianAxesOptions;
900
1204
  grid?: false | CartesianGridOptions;
901
- legend?: false | LegendOptions;
1205
+ legend?: false | (Omit<FilledMarkLegendOptions, "order"> & { order?: CartesianLegendOrder });
902
1206
  };
1207
+ type CartesianPathGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1208
+ legend?: false | (Omit<PathLegendOptions, "order"> & { order?: LegendValueOrder });
1209
+ };
1210
+ type CartesianCategoricalGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1211
+ legend?: false | (Omit<
1212
+ FilledMarkLegendOptions,
1213
+ "count" | "gradient" | "labels" | "order"
1214
+ > & {
1215
+ labels?: CategoricalLegendTextOptions;
1216
+ order?: CartesianLegendOrder;
1217
+ });
1218
+ };
1219
+ type BoxPlotGuideOptions = Omit<CartesianGuideOptions, "legend"> & { legend?: false };
903
1220
  type GradientPlotDensityLegendOptions = {
904
1221
  title?: string;
905
1222
  position?: "right";
@@ -912,7 +1229,7 @@ type ParallelGuideOptions = {
912
1229
  coordinate?: { id?: string; type?: "auto" | "parallel" };
913
1230
  };
914
1231
  grid?: false;
915
- legend?: false | LegendOptions;
1232
+ legend?: false | (Omit<PathLegendOptions, "order"> & { order?: LegendValueOrder });
916
1233
  };
917
1234
 
918
1235
  export interface CreateCoordinateOptions {
@@ -921,7 +1238,10 @@ export interface CreateCoordinateOptions {
921
1238
  layers?: readonly string[];
922
1239
  }
923
1240
 
1241
+ export type RadialMapping = "area" | "radius-length";
1242
+
924
1243
  export interface ScaleOptions {
1244
+ radialMapping?: RadialMapping;
925
1245
  id?: string;
926
1246
  type?: ScaleType;
927
1247
  domain?: "auto" | readonly unknown[];
@@ -939,6 +1259,7 @@ export interface ScaleOptions {
939
1259
  align?: number;
940
1260
  palette?: Palette;
941
1261
  interpolate?: ContinuousColorInterpolation;
1262
+ midpoint?: number | "auto";
942
1263
  unknown?: unknown;
943
1264
  }
944
1265
 
@@ -1018,6 +1339,7 @@ export type ShapeScaleOptions = ScaleFields<"id"> & {
1018
1339
  export type CreateScaleOptions = ScaleOptions & { id: string };
1019
1340
 
1020
1341
  export interface EditScaleOptions {
1342
+ radialMapping?: RadialMapping;
1021
1343
  id?: string;
1022
1344
  type?: ScaleType;
1023
1345
  domain?: "auto" | readonly unknown[];
@@ -1035,6 +1357,7 @@ export interface EditScaleOptions {
1035
1357
  align?: number;
1036
1358
  palette?: Palette;
1037
1359
  interpolate?: ContinuousColorInterpolation;
1360
+ midpoint?: number | "auto";
1038
1361
  unknown?: unknown;
1039
1362
  }
1040
1363
 
@@ -1061,6 +1384,7 @@ type PositionScaleBranches<Quantitative, Temporal, Categorical> =
1061
1384
  }
1062
1385
  | {
1063
1386
  fieldType: "temporal";
1387
+ temporalUnit?: TemporalInputUnit;
1064
1388
  aggregate?: never;
1065
1389
  scale?: Temporal;
1066
1390
  }
@@ -1115,27 +1439,38 @@ export interface RadiusScaleOptions {
1115
1439
  constant?: number;
1116
1440
  }
1117
1441
 
1118
- export interface ThetaEncodingOptions {
1442
+ export type ThetaEncodingOptions = {
1119
1443
  /**
1120
1444
  * Arc marks interpret an aggregate-free quantitative field as per-row sector
1121
1445
  * weights. Categorical arc theta retains the count and weighted-sum modes.
1122
1446
  */
1123
1447
  field: string;
1124
1448
  target?: string;
1125
- fieldType?: FieldType;
1126
1449
  scale?: ThetaScaleOptions;
1127
1450
  coordinate?: string;
1128
1451
  aggregate?: "count" | "sum";
1129
1452
  weight?: string;
1130
- }
1453
+ } & (
1454
+ | { fieldType?: Exclude<FieldType, "temporal">; temporalUnit?: never }
1455
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit }
1456
+ );
1131
1457
 
1132
- export interface RadialEncodingOptions {
1133
- field: string;
1458
+ export type MeasuredRadiusScaleOptions = Pick<RadiusScaleOptions, "id" | "domain" | "range" | "clamp"> & {
1459
+ type?: "linear";
1460
+ zero?: true;
1461
+ nice?: false;
1462
+ reverse?: false;
1463
+ };
1464
+
1465
+ export type RadialEncodingOptions = {
1134
1466
  target?: string;
1135
1467
  fieldType?: "quantitative";
1136
- scale?: RadiusScaleOptions;
1137
1468
  coordinate?: string;
1138
- }
1469
+ } & (
1470
+ | { field: string; mapping?: never; aggregate?: never; scale?: RadiusScaleOptions }
1471
+ | { field: string; mapping?: RadialMapping; aggregate: "sum"; scale?: MeasuredRadiusScaleOptions }
1472
+ | { field?: never; mapping?: RadialMapping; aggregate: "count"; scale?: MeasuredRadiusScaleOptions }
1473
+ );
1139
1474
 
1140
1475
  type RulePositionValue =
1141
1476
  | { field: string; datum?: never }
@@ -1157,7 +1492,7 @@ type InferredRuleDatumPositionEncodingOptions = {
1157
1492
  | NonPointCategoricalPositionScaleOptions;
1158
1493
  };
1159
1494
 
1160
- export type RulePositionEncodingOptions =
1495
+ export type DatumPositionEncodingOptions =
1161
1496
  | InferredRuleDatumPositionEncodingOptions
1162
1497
  | RulePositionEncodingBase & (
1163
1498
  | {
@@ -1166,6 +1501,7 @@ export type RulePositionEncodingOptions =
1166
1501
  }
1167
1502
  | {
1168
1503
  fieldType: "temporal";
1504
+ temporalUnit?: TemporalInputUnit;
1169
1505
  scale?: NonPointTemporalPositionScaleOptions;
1170
1506
  }
1171
1507
  | {
@@ -1174,21 +1510,45 @@ export type RulePositionEncodingOptions =
1174
1510
  }
1175
1511
  );
1176
1512
 
1513
+ /** Constant primary position accepted by Rule, Rect, Area, Point, Tick, and independent Text policies. */
1514
+ export type RulePositionEncodingOptions = DatumPositionEncodingOptions;
1515
+
1516
+ type TemporalBindingBranch =
1517
+ | { fieldType?: "quantitative"; temporalUnit?: never }
1518
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit };
1519
+
1177
1520
  type SecondaryRulePositionEncodingOptions = RulePositionEncodingBase & {
1178
- fieldType: FieldType;
1179
1521
  scale?: { id?: string };
1180
- };
1522
+ } & (
1523
+ | { fieldType: Exclude<FieldType, "temporal">; temporalUnit?: never }
1524
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit }
1525
+ );
1181
1526
 
1182
1527
  export type SecondaryPositionEncodingOptions =
1183
1528
  | SecondaryRulePositionEncodingOptions
1184
- | {
1185
- field: string;
1186
- datum?: never;
1187
- target?: string;
1188
- fieldType?: "quantitative" | "temporal";
1189
- scale?: { id?: string };
1190
- coordinate?: string;
1191
- };
1529
+ | { datum: unknown; field?: never; fieldType?: "quantitative"; target?: string; scale?: { id?: string }; coordinate?: string }
1530
+ | ({ field: string; datum?: never; target?: string; scale?: { id?: string }; coordinate?: string } & TemporalBindingBranch);
1531
+
1532
+ type AreaRangePositionEncodingOptions = {
1533
+ target?: string;
1534
+ coordinate?: string;
1535
+ fieldType?: "quantitative";
1536
+ temporalUnit?: never;
1537
+ scale?: NonPointQuantitativePositionScaleOptions;
1538
+ } & (
1539
+ | { lower: string; upper: { datum: number } }
1540
+ | { lower: { datum: number }; upper: string }
1541
+ );
1542
+
1543
+ type RangePositionEncodingOptions = AreaRangePositionEncodingOptions | {
1544
+ lower: string;
1545
+ upper: string;
1546
+ target?: string;
1547
+ coordinate?: string;
1548
+ } & (
1549
+ | { fieldType?: "quantitative"; temporalUnit?: never; scale?: NonPointQuantitativePositionScaleOptions }
1550
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit; scale?: NonPointTemporalPositionScaleOptions }
1551
+ );
1192
1552
 
1193
1553
  export type HistogramEncodingOptions = {
1194
1554
  field: string;
@@ -1229,7 +1589,8 @@ export interface DensityDataOptions {
1229
1589
  as?: readonly [string, string];
1230
1590
  }
1231
1591
 
1232
- type DensityEncodingBase = Omit<DensityDataOptions, "id"> & {
1592
+ type DensityEncodingBase = Omit<DensityDataOptions, "id" | "groupBy"> & {
1593
+ groupBy?: string | false;
1233
1594
  target?: string;
1234
1595
  densityChannel?: "x" | "y";
1235
1596
  coordinate?: string;
@@ -1254,6 +1615,7 @@ export type HorizonXEncoding = { field: string } & (
1254
1615
  }
1255
1616
  | {
1256
1617
  fieldType: "temporal";
1618
+ temporalUnit?: TemporalInputUnit;
1257
1619
  scale?: NonPointTemporalPositionScaleOptions;
1258
1620
  }
1259
1621
  | {
@@ -1286,7 +1648,7 @@ export interface HorizonEncodingOptions {
1286
1648
  source?: string;
1287
1649
  x?: string | HorizonXEncoding;
1288
1650
  y?: string | HorizonYEncoding;
1289
- groupBy?: string;
1651
+ groupBy?: string | false;
1290
1652
  bands?: number;
1291
1653
  baseline?: number;
1292
1654
  extent?: "auto" | number;
@@ -1317,6 +1679,7 @@ export interface IntervalDataOptions {
1317
1679
  groupBy?: string | readonly string[];
1318
1680
  center?: IntervalCenter;
1319
1681
  extent?: IntervalExtent;
1682
+ method?: ConfidenceIntervalMethod;
1320
1683
  level?: number;
1321
1684
  as?: IntervalOutputFields;
1322
1685
  }
@@ -1329,12 +1692,75 @@ export interface WindowDataOptions {
1329
1692
  operations: readonly WindowOperation[];
1330
1693
  }
1331
1694
 
1695
+ export interface ECDFDataOptions {
1696
+ id: string;
1697
+ source?: string;
1698
+ field: string;
1699
+ groupBy?: string | readonly [string, ...string[]];
1700
+ weight?: string;
1701
+ missing?: "drop" | "error";
1702
+ as?: ECDFOutputFields;
1703
+ }
1704
+
1332
1705
  export interface TimeUnitDataOptions {
1333
1706
  id: string;
1334
1707
  source?: string;
1335
1708
  field: string;
1336
1709
  unit: TimeUnit;
1710
+ temporalUnit?: TemporalInputUnit;
1711
+ as: string;
1712
+ }
1713
+
1714
+ export interface BinDataOutputFields {
1715
+ lower?: string;
1716
+ upper?: string;
1717
+ count?: string;
1718
+ members?: string;
1719
+ }
1720
+ type BinDataMode =
1721
+ | { maxBins?: number; step?: never; boundaries?: never }
1722
+ | { maxBins?: never; step: number; boundaries?: never }
1723
+ | {
1724
+ maxBins?: never;
1725
+ step?: never;
1726
+ boundaries: readonly [number, number, ...number[]];
1727
+ };
1728
+ export type BinDataOptions = {
1729
+ id: string;
1730
+ source?: string;
1731
+ field: string;
1732
+ extent?: "auto" | readonly [number, number];
1733
+ nice?: boolean;
1734
+ zero?: boolean;
1735
+ includeEmpty?: boolean;
1736
+ members?: boolean;
1737
+ as?: BinDataOutputFields;
1738
+ } & BinDataMode;
1739
+
1740
+ export interface FoldDataOutputFields {
1741
+ key?: string;
1742
+ value?: string;
1743
+ }
1744
+ export interface FoldDataOptions {
1745
+ id: string;
1746
+ source?: string;
1747
+ fields: readonly string[];
1748
+ as?: FoldDataOutputFields;
1749
+ }
1750
+ export interface ComputedDataOptions {
1751
+ id: string;
1752
+ source?: string;
1337
1753
  as: string;
1754
+ expression: ComputedExpression;
1755
+ }
1756
+ export interface StackDataOptions {
1757
+ id: string;
1758
+ source?: string;
1759
+ category: string;
1760
+ group: string;
1761
+ value: string;
1762
+ mode?: StackDataMode;
1763
+ as?: StackDataOutputFields;
1338
1764
  }
1339
1765
 
1340
1766
  export interface Bin2DDataOptions {
@@ -1368,6 +1794,7 @@ export type ErrorBarPositionChannel = { field?: string } & (
1368
1794
  }
1369
1795
  | {
1370
1796
  fieldType: "temporal";
1797
+ temporalUnit?: TemporalInputUnit;
1371
1798
  scale?: NonPointTemporalPositionScaleOptions;
1372
1799
  }
1373
1800
  | {
@@ -1380,6 +1807,7 @@ export interface ErrorBarStatisticalIntervalChannel {
1380
1807
  field?: string;
1381
1808
  center?: IntervalCenter;
1382
1809
  extent?: IntervalExtent;
1810
+ method?: ConfidenceIntervalMethod;
1383
1811
  level?: number;
1384
1812
  scale?: NonPointQuantitativePositionScaleOptions;
1385
1813
  }
@@ -1411,7 +1839,7 @@ export interface ErrorBarOptions {
1411
1839
  y?: ErrorBarPositionChannel | ErrorBarIntervalChannel;
1412
1840
  xOffset?: ErrorBarOffsetChannel;
1413
1841
  yOffset?: ErrorBarOffsetChannel;
1414
- groupBy?: string;
1842
+ groupBy?: string | false;
1415
1843
  coordinate?: string;
1416
1844
  caps?: boolean;
1417
1845
  capSize?: number;
@@ -1423,6 +1851,12 @@ export interface ErrorBarOptions {
1423
1851
 
1424
1852
  export interface EditErrorBarOptions {
1425
1853
  target?: string;
1854
+ data?: string;
1855
+ x?: ErrorBarPositionChannel | ErrorBarIntervalChannel;
1856
+ y?: ErrorBarPositionChannel | ErrorBarIntervalChannel;
1857
+ xOffset?: ErrorBarOffsetChannel | false;
1858
+ yOffset?: ErrorBarOffsetChannel | false;
1859
+ groupBy?: string | false;
1426
1860
  caps?: boolean;
1427
1861
  capSize?: number;
1428
1862
  stroke?: string;
@@ -1432,6 +1866,7 @@ export interface EditErrorBarOptions {
1432
1866
  statistics?: {
1433
1867
  center?: IntervalCenter;
1434
1868
  extent?: IntervalExtent;
1869
+ method?: ConfidenceIntervalMethod;
1435
1870
  level?: number;
1436
1871
  };
1437
1872
  }
@@ -1481,7 +1916,7 @@ export interface BoxPlotOptions {
1481
1916
  radius?: number;
1482
1917
  opacity?: number;
1483
1918
  };
1484
- guides?: false | CartesianGuideOptions;
1919
+ guides?: false | BoxPlotGuideOptions;
1485
1920
  }
1486
1921
 
1487
1922
  export interface EditBoxPlotOptions {
@@ -1567,6 +2002,7 @@ export type ViolinPlotPositionChannel =
1567
2002
  export interface ViolinPlotDensityOptions
1568
2003
  extends GradientPlotDensityOptions {
1569
2004
  width?: DensityPlacementWidth;
2005
+ side?: "both" | "left" | "right" | "top" | "bottom";
1570
2006
  }
1571
2007
 
1572
2008
  export interface ViolinPlotSplitOptions {
@@ -1602,7 +2038,16 @@ export interface ViolinPlotOptions {
1602
2038
  color?: ViolinPlotColorOptions;
1603
2039
  density?: ViolinPlotDensityOptions;
1604
2040
  area?: ViolinPlotAreaOptions;
1605
- guides?: false | CartesianGuideOptions;
2041
+ guides?: false | CartesianCategoricalGuideOptions;
2042
+ }
2043
+
2044
+ export interface EditViolinPlotOptions {
2045
+ target?: string;
2046
+ data?: string;
2047
+ x?: ViolinPlotPositionChannel;
2048
+ y?: ViolinPlotPositionChannel;
2049
+ split?: false | ViolinPlotSplitOptions;
2050
+ density?: ViolinPlotDensityOptions;
1606
2051
  }
1607
2052
 
1608
2053
  export interface EditGradientPlotOptions {
@@ -1629,6 +2074,7 @@ type PointFacadePositionChannel =
1629
2074
  }
1630
2075
  | {
1631
2076
  fieldType: "temporal";
2077
+ temporalUnit?: TemporalInputUnit;
1632
2078
  scale?: TemporalPositionScaleOptions;
1633
2079
  }
1634
2080
  | {
@@ -1645,6 +2091,7 @@ type LineXPositionChannel =
1645
2091
  }
1646
2092
  | {
1647
2093
  fieldType: "temporal";
2094
+ temporalUnit?: TemporalInputUnit;
1648
2095
  scale?: NonPointTemporalPositionScaleOptions;
1649
2096
  }
1650
2097
  ));
@@ -1658,6 +2105,7 @@ type LineYPositionChannel =
1658
2105
  }
1659
2106
  | {
1660
2107
  fieldType: "temporal";
2108
+ temporalUnit?: TemporalInputUnit;
1661
2109
  aggregate?: never;
1662
2110
  scale?: NonPointTemporalPositionScaleOptions;
1663
2111
  }
@@ -1669,6 +2117,14 @@ type BandPositionChannel = FacadePositionChannel<
1669
2117
  >;
1670
2118
  type BarYPositionChannel =
1671
2119
  | string
2120
+ | {
2121
+ field: string;
2122
+ fieldType: "temporal";
2123
+ temporalUnit?: TemporalInputUnit;
2124
+ aggregate?: never;
2125
+ stack?: never;
2126
+ scale?: NonPointTemporalPositionScaleOptions;
2127
+ }
1672
2128
  | ({ field: string; stack?: StackMode } & (
1673
2129
  | {
1674
2130
  fieldType?: "quantitative";
@@ -1703,7 +2159,8 @@ type BasicColorChannel =
1703
2159
  | {
1704
2160
  field: string;
1705
2161
  fieldType: "temporal";
1706
- scale?: ContinuousColorScaleOptions;
2162
+ temporalUnit?: TemporalInputUnit;
2163
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
1707
2164
  palette?: Palette;
1708
2165
  };
1709
2166
  type NonPointCategoricalColorChannel =
@@ -1767,7 +2224,8 @@ type RectColorChannel =
1767
2224
  | {
1768
2225
  field: string;
1769
2226
  fieldType: "temporal";
1770
- scale?: NonPointContinuousColorScaleOptions;
2227
+ temporalUnit?: TemporalInputUnit;
2228
+ scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
1771
2229
  palette?: Palette;
1772
2230
  };
1773
2231
  export type BasicSizeChannel = string | {
@@ -1841,58 +2299,524 @@ export interface CreateScatterPlotOptions {
1841
2299
  size?: BasicSizeChannel;
1842
2300
  shape?: BasicShapeChannel;
1843
2301
  point?: {
2302
+ radius?: number;
1844
2303
  shape?: PointShape;
1845
2304
  fill?: string;
1846
2305
  opacity?: number;
1847
- stroke?: string;
2306
+ stroke?: FilledMarkStroke;
1848
2307
  strokeWidth?: number;
1849
2308
  };
1850
- guides?: false | CreateGuidesOptions;
2309
+ guides?: false | CartesianGuideOptions;
1851
2310
  }
1852
2311
 
1853
- export interface CreateLinePlotOptions {
1854
- id?: string;
1855
- data?: string;
1856
- coordinate?: string;
1857
- x: LineXPositionChannel;
1858
- y: LineYPositionChannel;
1859
- color?: LineCategoricalColorChannel;
1860
- groupBy?: string;
1861
- strokeDash?: BasicStrokeDashChannel;
1862
- line?: {
1863
- strokeWidth?: number;
1864
- curve?: CurveInterpolation;
1865
- stroke?: string;
1866
- opacity?: number;
1867
- closed?: false;
1868
- };
1869
- guides?: false | CreateGuidesOptions;
2312
+ export interface IntervalPlotErrorBarOptions {
2313
+ caps?: boolean;
2314
+ capSize?: number;
2315
+ stroke?: string;
2316
+ strokeWidth?: number;
2317
+ strokeDash?: DashStyle | DashPattern;
2318
+ opacity?: number;
1870
2319
  }
1871
-
1872
- type BasicHistogramEncoding =
1873
- HistogramEncodingOptions extends infer T
1874
- ? T extends unknown
1875
- ? Omit<T, "field" | "target" | "coordinate" | "stack"> & {
1876
- stack?: Exclude<StackMode, "center">;
1877
- }
1878
- : never
1879
- : never;
1880
-
1881
- export interface CreateBarPlotOptions {
2320
+ type IntervalPlotBaseOptions = {
1882
2321
  id?: string;
1883
2322
  data?: string;
1884
2323
  coordinate?: string;
1885
- x: BandPositionChannel;
1886
- y: BarYPositionChannel;
1887
- color?: BarColorChannel;
1888
- width?: Omit<BarWidthOptions, "target">;
1889
- bar?: {
2324
+ xOffset?: ErrorBarOffsetChannel;
2325
+ yOffset?: ErrorBarOffsetChannel;
2326
+ groupBy?: string | false;
2327
+ color?: BasicColorChannel;
2328
+ point?: CreateScatterPlotOptions["point"];
2329
+ errorBar?: IntervalPlotErrorBarOptions;
2330
+ guides?: false | CartesianGuideOptions;
2331
+ };
2332
+ export type CreateIntervalPlotOptions = IntervalPlotBaseOptions & (
2333
+ | {
2334
+ x: string | ErrorBarPositionChannel;
2335
+ y: string | ErrorBarIntervalChannel;
2336
+ }
2337
+ | {
2338
+ x: string | ErrorBarIntervalChannel;
2339
+ y: string | ErrorBarPositionChannel;
2340
+ }
2341
+ );
2342
+
2343
+ export type RegressionPlotPositionChannel = string | {
2344
+ field: string;
2345
+ fieldType?: "quantitative";
2346
+ scale?: NonPointQuantitativePositionScaleOptions;
2347
+ };
2348
+ type RegressionPlotBaseOptions = {
2349
+ id?: string;
2350
+ data?: string;
2351
+ coordinate?: string;
2352
+ x: RegressionPlotPositionChannel;
2353
+ y: RegressionPlotPositionChannel;
2354
+ color?: BasicColorChannel;
2355
+ size?: BasicSizeChannel;
2356
+ shape?: BasicShapeChannel;
2357
+ point?: CreateScatterPlotOptions["point"];
2358
+ guides?: false | CartesianGuideOptions;
2359
+ };
2360
+ type RegressionPlotStatisticalOptions<T> = T extends unknown
2361
+ ? Omit<T, "target" | "x" | "y">
2362
+ : never;
2363
+ export type CreateRegressionPlotOptions = RegressionPlotBaseOptions &
2364
+ RegressionPlotStatisticalOptions<RegressionOptions>;
2365
+
2366
+ export type EndpointPlotSummary = false | "mean" | "median" | "sum" | "min" | "max";
2367
+ export type EndpointCategoryChannel = string | {
2368
+ field: string;
2369
+ fieldType?: "nominal" | "ordinal";
2370
+ scale?: NonPointCategoricalPositionScaleOptions;
2371
+ };
2372
+ export type EndpointValueChannel = string | {
2373
+ field: string;
2374
+ fieldType?: "quantitative";
2375
+ scale?: NonPointQuantitativePositionScaleOptions;
2376
+ };
2377
+ export type EndpointLabelOptions = Omit<
2378
+ TextMarkOptions,
2379
+ "id" | "data" | "source" | "text"
2380
+ > & {
2381
+ format?: TextFormat;
2382
+ layout?: false | Omit<LabelLayoutOptions, "target">;
2383
+ } & (
2384
+ | { field?: string; value?: never }
2385
+ | { field?: never; value: unknown }
2386
+ );
2387
+ type EndpointPlotBaseOptions = {
2388
+ id?: string;
2389
+ data?: string;
2390
+ coordinate?: string;
2391
+ category: EndpointCategoryChannel;
2392
+ orientation?: "horizontal" | "vertical";
2393
+ summary?: EndpointPlotSummary;
2394
+ guides?: false | CartesianGuideOptions;
2395
+ };
2396
+ export interface CreateDotPlotOptions extends EndpointPlotBaseOptions {
2397
+ value: EndpointValueChannel;
2398
+ point?: CreateScatterPlotOptions["point"];
2399
+ labels?: false | EndpointLabelOptions;
2400
+ }
2401
+ export interface CreateLollipopPlotOptions extends EndpointPlotBaseOptions {
2402
+ value: EndpointValueChannel;
2403
+ baseline?: number;
2404
+ point?: CreateScatterPlotOptions["point"];
2405
+ stem?: RuleStyleOptions;
2406
+ labels?: false | EndpointLabelOptions;
2407
+ }
2408
+ export interface CreateDumbbellPlotOptions extends EndpointPlotBaseOptions {
2409
+ start: EndpointValueChannel;
2410
+ end: EndpointValueChannel;
2411
+ startPoint?: CreateScatterPlotOptions["point"];
2412
+ endPoint?: CreateScatterPlotOptions["point"];
2413
+ connector?: RuleStyleOptions;
2414
+ labels?: false | (EndpointLabelOptions & { endpoint?: "start" | "end" | "both" });
2415
+ }
2416
+ export type EditEndpointPlotOptions = { target?: string } & Partial<Pick<
2417
+ CreateDumbbellPlotOptions,
2418
+ "data" | "coordinate" | "category" | "start" | "end" | "orientation" | "summary"
2419
+ >> & {
2420
+ value?: EndpointValueChannel;
2421
+ baseline?: number;
2422
+ };
2423
+
2424
+ export interface CreateECDFPlotOptions {
2425
+ id?: string;
2426
+ data?: string;
2427
+ coordinate?: string;
2428
+ field: string;
2429
+ groupBy?: string | readonly [string, ...string[]];
2430
+ weight?: string;
2431
+ missing?: "drop" | "error";
2432
+ as?: ECDFOutputFields;
2433
+ color?: string | LineCategoricalColorChannel;
2434
+ line?: { strokeWidth?: number; stroke?: string; opacity?: number };
2435
+ labels?: false | EndpointLabelOptions;
2436
+ guides?: false | CartesianPathGuideOptions;
2437
+ }
2438
+ export type EditECDFPlotOptions = { target?: string } & Partial<Pick<
2439
+ CreateECDFPlotOptions,
2440
+ "data" | "coordinate" | "field" | "missing" | "as"
2441
+ >> & {
2442
+ groupBy?: CreateECDFPlotOptions["groupBy"] | false;
2443
+ weight?: string | false;
2444
+ color?: CreateECDFPlotOptions["color"] | false;
2445
+ };
2446
+
2447
+ export type PolarThetaChannel = string | ({ field: string; scale?: ThetaScaleOptions } & (
2448
+ | { fieldType?: "quantitative" | "nominal" | "ordinal"; temporalUnit?: never }
2449
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit }
2450
+ ));
2451
+ export type PolarRadiusChannel = string | {
2452
+ field: string;
2453
+ fieldType?: "quantitative";
2454
+ scale?: RadiusScaleOptions;
2455
+ };
2456
+ export type PolarChartGuideOptions = {
2457
+ axes?: false | Pick<CreateAxesOptions, "theta" | "radius"> & {
2458
+ coordinate?: { id?: string; type?: "auto" | "polar" };
2459
+ };
2460
+ grid?: false | Pick<CreateGridOptions, "theta" | "radial">;
2461
+ legend?: false | LegendOptions;
2462
+ };
2463
+ type PolarLegendOrder = LegendValueOrder | { channel: "theta"; values?: never };
2464
+ type PolarPathLegendOptions = Omit<PathLegendOptions, "order"> & {
2465
+ order?: PolarLegendOrder;
2466
+ };
2467
+ type PolarPointLegendOptions = Omit<FilledMarkLegendOptions, "order"> & {
2468
+ order?: PolarLegendOrder;
2469
+ };
2470
+ export type PolarPathGuideOptions = Omit<PolarChartGuideOptions, "legend"> & {
2471
+ legend?: false | PolarPathLegendOptions;
2472
+ };
2473
+ export type PolarPointGuideOptions = Omit<PolarChartGuideOptions, "legend"> & {
2474
+ legend?: false | PolarPointLegendOptions;
2475
+ };
2476
+ export interface CreatePolarScatterPlotOptions {
2477
+ id?: string;
2478
+ data?: string;
2479
+ coordinate?: string;
2480
+ theta: PolarThetaChannel;
2481
+ radius: PolarRadiusChannel;
2482
+ color?: BasicColorChannel;
2483
+ size?: BasicSizeChannel;
2484
+ shape?: BasicShapeChannel;
2485
+ point?: CreateScatterPlotOptions["point"];
2486
+ guides?: false | PolarPointGuideOptions;
2487
+ }
2488
+ export interface CreatePolarLinePlotOptions {
2489
+ id?: string;
2490
+ data?: string;
2491
+ coordinate?: string;
2492
+ theta: PolarThetaChannel;
2493
+ radius: PolarRadiusChannel;
2494
+ color?: LineCategoricalColorChannel;
2495
+ groupBy?: string | readonly [string, ...string[]];
2496
+ strokeDash?: BasicStrokeDashChannel;
2497
+ line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve"> & {
2498
+ curve?: "linear";
2499
+ closed?: boolean;
2500
+ };
2501
+ guides?: false | PolarPathGuideOptions;
2502
+ }
2503
+ export type RadarCategoryValue = string | number | boolean;
2504
+ export type RadarCategoryScaleOptions = Pick<
2505
+ ThetaScaleOptions,
2506
+ "id" | "domain" | "range" | "reverse" | "paddingInner" | "paddingOuter" |
2507
+ "padding" | "align"
2508
+ > & { type?: "band" | "point" };
2509
+ export type RadarCategoryChannel = string | {
2510
+ field: string;
2511
+ fieldType?: "nominal" | "ordinal";
2512
+ scale?: RadarCategoryScaleOptions;
2513
+ };
2514
+ type CategoricalThetaTicksAndLabelsOptions = Omit<
2515
+ PolarTicksAndLabelsOptions,
2516
+ "count" | "labels"
2517
+ > & {
2518
+ count?: never;
2519
+ labels?: Omit<AxisLabelStyleOptions, "format"> & { format?: "auto" };
2520
+ };
2521
+ type CategoricalThetaAxisOptions = Omit<CompletePolarAxisOptions, "ticksAndLabels"> & {
2522
+ ticksAndLabels?: false | CategoricalThetaTicksAndLabelsOptions;
2523
+ };
2524
+ type CategoricalThetaGridOptions = Omit<PolarGridOptions, "count"> & {
2525
+ count?: never;
2526
+ };
2527
+ type CategoricalPolarAxesOptions = Omit<
2528
+ Pick<CreateAxesOptions, "theta" | "radius">,
2529
+ "theta"
2530
+ > & {
2531
+ coordinate?: { id?: string; type?: "auto" | "polar" };
2532
+ theta?: false | CategoricalThetaAxisOptions;
2533
+ };
2534
+ type CategoricalPolarGridOptions = Omit<
2535
+ Pick<CreateGridOptions, "theta" | "radial">,
2536
+ "theta"
2537
+ > & {
2538
+ theta?: boolean | CategoricalThetaGridOptions;
2539
+ };
2540
+ export type RadarGuideOptions = Omit<PolarPathGuideOptions, "axes" | "grid" | "legend"> & {
2541
+ axes?: false | CategoricalPolarAxesOptions;
2542
+ grid?: false | CategoricalPolarGridOptions;
2543
+ legend?: false | (Omit<PathLegendOptions, "order"> & { order?: LegendValueOrder });
2544
+ };
2545
+ export interface RadarWideOptions {
2546
+ fields: readonly [string, string, string, ...string[]];
2547
+ as?: { key?: string; value?: string };
2548
+ }
2549
+ export type CreateRadarPlotOptions = {
2550
+ id?: string;
2551
+ data?: string;
2552
+ coordinate?: string;
2553
+ groupBy?: string | readonly [string, ...string[]];
2554
+ order?: readonly [
2555
+ RadarCategoryValue,
2556
+ RadarCategoryValue,
2557
+ RadarCategoryValue,
2558
+ ...RadarCategoryValue[]
2559
+ ];
2560
+ color?: LineCategoricalColorChannel;
2561
+ strokeDash?: BasicStrokeDashChannel;
2562
+ line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve"> & {
2563
+ curve?: "linear";
2564
+ closed?: true;
2565
+ };
2566
+ guides?: false | RadarGuideOptions;
2567
+ } & (
2568
+ | { category: RadarCategoryChannel; value: PolarRadiusChannel; wide?: never }
2569
+ | { wide: RadarWideOptions; category?: never; value?: never }
2570
+ );
2571
+ export type RugMeasureChannel = string | (
2572
+ | {
2573
+ field: string;
2574
+ fieldType?: "quantitative";
2575
+ temporalUnit?: never;
2576
+ scale?: NonPointQuantitativePositionScaleOptions;
2577
+ }
2578
+ | {
2579
+ field: string;
2580
+ fieldType: "temporal";
2581
+ temporalUnit?: TemporalInputUnit;
2582
+ scale?: NonPointTemporalPositionScaleOptions;
2583
+ }
2584
+ );
2585
+ export interface RugTickOptions {
2586
+ length?: number;
2587
+ stroke?: string;
2588
+ strokeWidth?: number;
2589
+ opacity?: number;
2590
+ }
2591
+ export type RugGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
2592
+ legend?: false;
2593
+ };
2594
+ export type CreateRugPlotOptions = {
2595
+ id?: string;
2596
+ data?: string;
2597
+ coordinate?: string;
2598
+ tick?: RugTickOptions;
2599
+ guides?: false | RugGuideOptions;
2600
+ } & (
2601
+ | { x: RugMeasureChannel; y?: never; edge: "top" | "bottom" }
2602
+ | { y: RugMeasureChannel; x?: never; edge: "left" | "right" }
2603
+ );
2604
+ export type StripCategoryChannel = string | {
2605
+ field: string;
2606
+ fieldType?: "nominal" | "ordinal";
2607
+ scale?: CategoricalPositionScaleOptions;
2608
+ };
2609
+ export interface StripPixelJitterOptions {
2610
+ maxOffset: { pixels: number; band?: never };
2611
+ seed?: string | number;
2612
+ key?: string;
2613
+ }
2614
+ export interface StripBandJitterOptions {
2615
+ maxOffset: { pixels?: never; band: number };
2616
+ seed?: string | number;
2617
+ key?: string;
2618
+ }
2619
+ export type StripJitterOptions = StripPixelJitterOptions | StripBandJitterOptions;
2620
+ export type CreateStripPlotOptions = {
2621
+ id?: string;
2622
+ data?: string;
2623
+ coordinate?: string;
2624
+ color?: BasicColorChannel;
2625
+ size?: BasicSizeChannel;
2626
+ shape?: BasicShapeChannel;
2627
+ point?: {
2628
+ radius?: number;
2629
+ shape?: PointShape;
2630
+ fill?: string;
2631
+ opacity?: number;
2632
+ stroke?: FilledMarkStroke;
2633
+ strokeWidth?: number;
2634
+ };
2635
+ guides?: false | CartesianGuideOptions;
2636
+ } & (
2637
+ | { x: RugMeasureChannel; y?: never; jitter?: false | StripPixelJitterOptions }
2638
+ | { x: RugMeasureChannel; y: StripCategoryChannel; jitter?: false | StripBandJitterOptions }
2639
+ | { x: StripCategoryChannel; y: RugMeasureChannel; jitter?: false | StripBandJitterOptions }
2640
+ );
2641
+ export interface BeeswarmPackingOptions {
2642
+ maxOffset?: PointPackingMaxOffset;
2643
+ padding?: number;
2644
+ key?: string;
2645
+ overflow?: "error" | "overlap";
2646
+ }
2647
+ export type CreateBeeswarmPlotOptions = {
2648
+ id?: string;
2649
+ data?: string;
2650
+ coordinate?: string;
2651
+ color?: BasicColorChannel;
2652
+ size?: BasicSizeChannel;
2653
+ shape?: BasicShapeChannel;
2654
+ point?: {
2655
+ radius?: number;
2656
+ shape?: PointShape;
1890
2657
  fill?: string;
1891
2658
  opacity?: number;
2659
+ stroke?: FilledMarkStroke;
2660
+ strokeWidth?: number;
2661
+ };
2662
+ packing?: false | BeeswarmPackingOptions;
2663
+ guides?: false | CartesianGuideOptions;
2664
+ } & (
2665
+ | { x: RugMeasureChannel; y: StripCategoryChannel }
2666
+ | { x: StripCategoryChannel; y: RugMeasureChannel }
2667
+ );
2668
+
2669
+ export interface RaincloudDensityOptions extends GradientPlotDensityOptions {
2670
+ width?: DensityPlacementWidth;
2671
+ area?: ViolinPlotAreaOptions;
2672
+ }
2673
+ export interface RaincloudBoxSummaryOptions {
2674
+ type?: "box";
2675
+ whisker?: BoxPlotWhisker;
2676
+ width?: { band?: number };
2677
+ outliers?: boolean;
2678
+ box?: BoxPlotOptions["box"];
2679
+ median?: BoxPlotOptions["median"];
2680
+ outlier?: BoxPlotOptions["outlier"];
2681
+ }
2682
+ export interface RaincloudIntervalSummaryOptions {
2683
+ type: "interval";
2684
+ center?: IntervalCenter;
2685
+ extent?: IntervalExtent;
2686
+ method?: ConfidenceIntervalMethod;
2687
+ level?: number;
2688
+ point?: CreateScatterPlotOptions["point"];
2689
+ errorBar?: IntervalPlotErrorBarOptions;
2690
+ }
2691
+ export type RaincloudSummaryOptions =
2692
+ | RaincloudBoxSummaryOptions
2693
+ | RaincloudIntervalSummaryOptions;
2694
+ export interface RaincloudPointAppearanceOptions {
2695
+ size?: BasicSizeChannel;
2696
+ shape?: BasicShapeChannel;
2697
+ point?: CreateScatterPlotOptions["point"];
2698
+ }
2699
+ export type RaincloudPointsOptions =
2700
+ | (RaincloudPointAppearanceOptions & {
2701
+ type: "strip";
2702
+ jitter?: false | StripBandJitterOptions;
2703
+ packing?: never;
2704
+ })
2705
+ | (RaincloudPointAppearanceOptions & {
2706
+ type?: "beeswarm";
2707
+ packing?: false | BeeswarmPackingOptions;
2708
+ jitter?: never;
2709
+ });
2710
+ export type RaincloudCategoryChannel = string | {
2711
+ field: string;
2712
+ fieldType?: "nominal" | "ordinal";
2713
+ scale?: NonPointBandPositionScaleOptions;
2714
+ };
2715
+ export type RaincloudValueChannel = string | {
2716
+ field: string;
2717
+ fieldType?: "quantitative";
2718
+ scale?: NonPointQuantitativePositionScaleOptions;
2719
+ };
2720
+ export interface CreateRaincloudPlotOptions {
2721
+ id?: string;
2722
+ data?: string;
2723
+ coordinate?: string;
2724
+ category: RaincloudCategoryChannel;
2725
+ value: RaincloudValueChannel;
2726
+ orientation?: "vertical" | "horizontal";
2727
+ side?: "before" | "after";
2728
+ density?: false | RaincloudDensityOptions;
2729
+ summary?: false | RaincloudSummaryOptions;
2730
+ points?: false | RaincloudPointsOptions;
2731
+ color?: LineCategoricalColorChannel;
2732
+ guides?: false | CartesianCategoricalGuideOptions;
2733
+ }
2734
+ export interface EditRaincloudPlotOptions {
2735
+ target?: string;
2736
+ data?: string;
2737
+ category?: RaincloudCategoryChannel;
2738
+ value?: RaincloudValueChannel;
2739
+ orientation?: "vertical" | "horizontal";
2740
+ side?: "before" | "after";
2741
+ density?: false | RaincloudDensityOptions;
2742
+ summary?: false | RaincloudSummaryOptions;
2743
+ points?: false | RaincloudPointsOptions;
2744
+ color?: false | LineCategoricalColorChannel;
2745
+ }
2746
+
2747
+ export type GroupEncodingOptions = { target?: string; fieldType?: "nominal" } & (
2748
+ | { field: string; fields?: never }
2749
+ | { fields: readonly [string, ...string[]]; field?: never }
2750
+ );
2751
+
2752
+ export interface SeriesLayoutOptions { target?: string; mode: ColorLayout; }
2753
+ export interface BasicSeriesLayoutOptions { target?: string; mode: Exclude<ColorLayout, "center">; }
2754
+ export type AreaPlotIndependentChannel = string | ({ field: string } & (
2755
+ | { fieldType?: "quantitative"; scale?: NonPointQuantitativePositionScaleOptions }
2756
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit; scale?: NonPointTemporalPositionScaleOptions }
2757
+ ));
2758
+ export type AreaPlotMeasureChannel = string | { field: string; scale?: NonPointQuantitativePositionScaleOptions }
2759
+ | ({ scale?: NonPointQuantitativePositionScaleOptions } & (
2760
+ | { lower: string; upper: string | { datum: number } }
2761
+ | { lower: { datum: number }; upper: string }
2762
+ ));
2763
+ export type CreateAreaPlotOptions = {
2764
+ id?: string; data?: string; coordinate?: string;
2765
+ groupBy?: string | readonly [string, ...string[]];
2766
+ layout?: Exclude<ColorLayout, "group">; missing?: "error" | "break";
2767
+ color?: string | { field: string; fieldType?: "nominal" | "ordinal"; scale?: NonPointCategoricalColorScaleOptions; palette?: Palette };
2768
+ area?: { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
2769
+ guides?: false | DensityPlotGuideOptions;
2770
+ } & (
2771
+ | { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Exclude<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: number }
2772
+ | { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Extract<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: never }
2773
+ | { valueChannel: "x"; x: Exclude<AreaPlotMeasureChannel, { lower: unknown }>; y: AreaPlotIndependentChannel; baseline?: number }
2774
+ | { valueChannel: "x"; x: Extract<AreaPlotMeasureChannel, { lower: unknown }>; y: AreaPlotIndependentChannel; baseline?: never }
2775
+ );
2776
+
2777
+ export interface CreateLinePlotOptions {
2778
+ id?: string;
2779
+ data?: string;
2780
+ coordinate?: string;
2781
+ x: LineXPositionChannel;
2782
+ y: LineYPositionChannel;
2783
+ color?: LineCategoricalColorChannel;
2784
+ groupBy?: string | readonly [string, ...string[]];
2785
+ strokeDash?: BasicStrokeDashChannel;
2786
+ line?: {
2787
+ strokeWidth?: number;
2788
+ curve?: CurveInterpolation;
1892
2789
  stroke?: string;
2790
+ opacity?: number;
2791
+ closed?: false;
2792
+ };
2793
+ guides?: false | CartesianPathGuideOptions;
2794
+ }
2795
+
2796
+ type BasicHistogramEncoding =
2797
+ HistogramEncodingOptions extends infer T
2798
+ ? T extends unknown
2799
+ ? Omit<T, "field" | "target" | "coordinate" | "stack"> & {
2800
+ stack?: Exclude<StackMode, "center">;
2801
+ }
2802
+ : never
2803
+ : never;
2804
+
2805
+ export interface CreateBarPlotOptions {
2806
+ id?: string;
2807
+ data?: string;
2808
+ coordinate?: string;
2809
+ x: BandPositionChannel;
2810
+ y: BarYPositionChannel;
2811
+ color?: BarColorChannel;
2812
+ width?: Omit<BarWidthOptions, "target">;
2813
+ bar?: {
2814
+ fill?: string;
2815
+ opacity?: number;
2816
+ stroke?: FilledMarkStroke;
1893
2817
  strokeWidth?: number;
1894
2818
  };
1895
- guides?: false | CreateGuidesOptions;
2819
+ guides?: false | CartesianGuideOptions;
1896
2820
  }
1897
2821
 
1898
2822
  export type CreateHistogramOptions = BasicHistogramEncoding & {
@@ -1904,11 +2828,105 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
1904
2828
  bar?: {
1905
2829
  fill?: string;
1906
2830
  opacity?: number;
1907
- stroke?: string;
2831
+ stroke?: FilledMarkStroke;
1908
2832
  strokeWidth?: number;
1909
2833
  };
1910
- guides?: false | CreateGuidesOptions;
2834
+ guides?: false | CartesianCategoricalGuideOptions;
2835
+ };
2836
+
2837
+ export type HorizonPlotGuideOptions = {
2838
+ axes?: false | (Omit<CartesianAxesOptions, "y"> & { y?: false });
2839
+ grid?: false | (Pick<CartesianGridOptions, "vertical"> & { horizontal?: false });
2840
+ legend?: false;
2841
+ };
2842
+ export interface CreateHorizonPlotOptions {
2843
+ id?: string;
2844
+ data?: string;
2845
+ coordinate?: string;
2846
+ x: string | HorizonXEncoding;
2847
+ y: string | HorizonYEncoding;
2848
+ groupBy?: string | false;
2849
+ bands?: number;
2850
+ baseline?: number;
2851
+ extent?: "auto" | number;
2852
+ resolve?: HorizonResolution;
2853
+ missing?: HorizonMissingPolicy;
2854
+ overflow?: HorizonOverflowPolicy;
2855
+ palette?: HorizonPaletteOptions;
2856
+ area?: { opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
2857
+ guides?: false | HorizonPlotGuideOptions;
2858
+ }
2859
+
2860
+ export type DensityPlotLegendOptions = Omit<PieLegendOptions, "order"> & { order?: LegendValueOrder };
2861
+ export type DensityPlotGuideOptions = Omit<CartesianCategoricalGuideOptions, "legend"> & {
2862
+ legend?: false | DensityPlotLegendOptions;
2863
+ };
2864
+ export interface CreateDensityPlotOptions {
2865
+ id?: string;
2866
+ data?: string;
2867
+ coordinate?: string;
2868
+ field: string;
2869
+ groupBy?: string | false;
2870
+ bandwidth?: "auto" | number;
2871
+ extent?: "auto" | readonly [number, number];
2872
+ steps?: number;
2873
+ kernel?: DensityKernel;
2874
+ normalization?: DensityNormalization;
2875
+ as?: readonly [string, string];
2876
+ densityChannel?: "x" | "y";
2877
+ valueScale?: NonPointQuantitativePositionScaleOptions;
2878
+ densityScale?: NonPointZeroSupportingPositionScaleOptions;
2879
+ color?: string | {
2880
+ field: string;
2881
+ fieldType?: "nominal" | "ordinal";
2882
+ scale?: NonPointCategoricalColorScaleOptions;
2883
+ palette?: Palette;
2884
+ layout?: "overlay";
2885
+ };
2886
+ area?: { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
2887
+ guides?: false | DensityPlotGuideOptions;
2888
+ }
2889
+
2890
+ export type PieCategory = string | {
2891
+ field: string;
2892
+ fieldType?: "nominal" | "ordinal";
2893
+ scale?: Pick<ThetaScaleOptions, "id" | "domain" | "range" | "reverse"> & { type?: "band" };
2894
+ };
2895
+ export type PieColor = string | {
2896
+ field: string;
2897
+ fieldType?: "nominal" | "ordinal";
2898
+ scale?: NonPointCategoricalColorScaleOptions;
2899
+ palette?: Palette;
2900
+ };
2901
+ export type PieLegendOptions = Omit<
2902
+ FilledMarkLegendOptions,
2903
+ "count" | "gradient" | "channels" | "order" | "labels"
2904
+ > & {
2905
+ channels?: readonly ["color"];
2906
+ order?: LegendValueOrder | { channel: "theta"; values?: never };
2907
+ labels?: CategoricalLegendTextOptions;
1911
2908
  };
2909
+ export type CreatePiePlotOptions = {
2910
+ id?: string;
2911
+ data?: string;
2912
+ coordinate?: string;
2913
+ category: PieCategory;
2914
+ color?: false | PieColor;
2915
+ arc?: { innerRadius?: number; padAngle?: number; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
2916
+ guides?: false | { axes?: false; grid?: false; legend?: false | PieLegendOptions };
2917
+ } & ({ value?: never; aggregate?: "count" } | { value: string; aggregate: "sum" });
2918
+
2919
+ export type MeasuredRadialGuideOptions = {
2920
+ axes?: false | CategoricalPolarAxesOptions;
2921
+ grid?: false | CategoricalPolarGridOptions;
2922
+ legend?: false | PieLegendOptions;
2923
+ };
2924
+ export type CreateRosePlotOptions = Omit<CreatePiePlotOptions, "guides" | "arc" | "aggregate" | "value"> & {
2925
+ radiusScale?: MeasuredRadiusScaleOptions;
2926
+ arc?: { innerRadius?: number; padAngle?: 0; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
2927
+ guides?: false | MeasuredRadialGuideOptions;
2928
+ } & ({ value?: never; aggregate?: "count" } | { value: string; aggregate: "sum" });
2929
+ export type CreateRadialBarPlotOptions = CreateRosePlotOptions;
1912
2930
 
1913
2931
  export interface HeatmapBaseOptions {
1914
2932
  id?: string;
@@ -1974,6 +2992,7 @@ export type ErrorBandPositionChannel = { field?: string } & (
1974
2992
  }
1975
2993
  | {
1976
2994
  fieldType: "temporal";
2995
+ temporalUnit?: TemporalInputUnit;
1977
2996
  scale?: NonPointTemporalPositionScaleOptions;
1978
2997
  }
1979
2998
  );
@@ -1982,6 +3001,7 @@ export interface ErrorBandStatisticalIntervalChannel {
1982
3001
  field?: string;
1983
3002
  center?: IntervalCenter;
1984
3003
  extent?: IntervalExtent;
3004
+ method?: ConfidenceIntervalMethod;
1985
3005
  level?: number;
1986
3006
  scale?: NonPointQuantitativePositionScaleOptions;
1987
3007
  }
@@ -2019,12 +3039,17 @@ export interface ErrorBandOptions {
2019
3039
 
2020
3040
  export interface EditErrorBandOptions {
2021
3041
  target?: string;
2022
- fill?: string;
3042
+ data?: string;
3043
+ x?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3044
+ y?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3045
+ groupBy?: string | false;
3046
+ fill?: string | false;
2023
3047
  opacity?: number;
2024
3048
  curve?: CurveInterpolation;
2025
3049
  statistics?: {
2026
3050
  center?: IntervalCenter;
2027
3051
  extent?: IntervalExtent;
3052
+ method?: ConfidenceIntervalMethod;
2028
3053
  level?: number;
2029
3054
  };
2030
3055
  boundaries?: false | {
@@ -2056,6 +3081,8 @@ export interface EditDensityOptions {
2056
3081
  steps?: number;
2057
3082
  kernel?: DensityKernel;
2058
3083
  normalization?: DensityNormalization;
3084
+ densityChannel?: "x" | "y";
3085
+ valueScale?: NonPointQuantitativePositionScaleOptions;
2059
3086
  placement?: DensityPlacement;
2060
3087
  }
2061
3088
 
@@ -2078,11 +3105,13 @@ export interface OffsetEncodingOptions {
2078
3105
  export interface XOffsetEncodingOptions extends OffsetEncodingOptions {}
2079
3106
  export interface YOffsetEncodingOptions extends OffsetEncodingOptions {}
2080
3107
 
2081
- export type TextFormat = "auto" | `.${number}f`;
3108
+ export type TextFormat = ValueFormat;
2082
3109
 
2083
3110
  export interface TextMarkOptions {
2084
3111
  id?: string;
2085
3112
  data?: string;
3113
+ /** Explicit source mark. Mutually exclusive with data; may be incomplete. */
3114
+ source?: string;
2086
3115
  text?: unknown;
2087
3116
  fill?: string;
2088
3117
  opacity?: number;
@@ -2091,12 +3120,12 @@ export interface TextMarkOptions {
2091
3120
  fontWeight?: string | number;
2092
3121
  align?: "left" | "right" | "center" | "start" | "end";
2093
3122
  baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
2094
- rotation?: number;
3123
+ rotation?: RotationInput;
2095
3124
  dx?: number;
2096
3125
  dy?: number;
2097
3126
  }
2098
3127
 
2099
- export interface EditTextMarkOptions extends Omit<TextMarkOptions, "id" | "data" | "text"> {
3128
+ export interface EditTextMarkOptions extends Omit<TextMarkOptions, "id" | "data" | "source" | "text"> {
2100
3129
  target?: string;
2101
3130
  }
2102
3131
 
@@ -2140,10 +3169,57 @@ export type TextEncodingOptions = {
2140
3169
  target?: string;
2141
3170
  format?: TextFormat;
2142
3171
  } & (
2143
- | { field: string; value?: never }
2144
- | { field?: never; value: unknown }
3172
+ | { field: string; value?: never; content?: never; normalizeBy?: never }
3173
+ | { field?: never; value: unknown; content?: never; normalizeBy?: never }
3174
+ | { field?: never; value?: never; content: "category" | "value"; normalizeBy?: never }
3175
+ | { field?: never; value?: never; content: "share"; normalizeBy?: "source" | "category" }
3176
+ );
3177
+
3178
+ /** Attached final-item labels; lower text actions own subsequent edits. */
3179
+ export type CreateMarkLabelsOptions = Omit<TextMarkOptions, "data" | "text"> & {
3180
+ layout?: false | Omit<LabelLayoutOptions, "target">;
3181
+ } & (
3182
+ | (TextEncodingOptions extends infer Options
3183
+ ? Options extends TextEncodingOptions ? Omit<Options, "target"> : never
3184
+ : never)
3185
+ | { field?: never; value?: never; content?: never; normalizeBy?: never; format?: TextFormat }
2145
3186
  );
2146
3187
 
3188
+ type AnnotationBaseOptions = Omit<TextMarkOptions, "id" | "data" | "source" | "text"> & {
3189
+ id?: string;
3190
+ text: unknown;
3191
+ format?: TextFormat;
3192
+ layout?: false | Omit<LabelLayoutOptions, "target">;
3193
+ };
3194
+
3195
+ type AnnotationAnchor =
3196
+ | {
3197
+ x?: never;
3198
+ y?: never;
3199
+ space?: never;
3200
+ source?: string;
3201
+ data?: never;
3202
+ coordinate?: never;
3203
+ }
3204
+ | {
3205
+ x: unknown;
3206
+ y: unknown;
3207
+ space?: "data";
3208
+ source?: string;
3209
+ data?: never;
3210
+ coordinate?: never;
3211
+ }
3212
+ | {
3213
+ x: number;
3214
+ y: number;
3215
+ space: "plot";
3216
+ source?: never;
3217
+ data?: string;
3218
+ coordinate?: string;
3219
+ };
3220
+
3221
+ export type CreateAnnotationOptions = AnnotationBaseOptions & AnnotationAnchor;
3222
+
2147
3223
  export type BarWidthOptions = { target?: string } & (
2148
3224
  | { band?: number; pixels?: never }
2149
3225
  | { band?: never; pixels: number }
@@ -2173,7 +3249,7 @@ export type StrokeDashEncodingOptions =
2173
3249
  };
2174
3250
 
2175
3251
  export type NonPointContinuousColorScaleOptions = ScaleFields<
2176
- "id" | "interpolate" | "clamp" | "reverse"
3252
+ "id" | "interpolate" | "midpoint" | "clamp" | "reverse"
2177
3253
  > & {
2178
3254
  type?: "sequential";
2179
3255
  domain?: "auto" | readonly [unknown, unknown];
@@ -2237,8 +3313,9 @@ export type ColorEncodingOptions =
2237
3313
  field: string;
2238
3314
  target?: string;
2239
3315
  fieldType: "temporal";
3316
+ temporalUnit?: TemporalInputUnit;
2240
3317
  aggregate?: never;
2241
- scale?: ContinuousColorScaleOptions;
3318
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
2242
3319
  palette?: Palette;
2243
3320
  layout?: never;
2244
3321
  };
@@ -2253,7 +3330,7 @@ export type OpacityScaleOptions = ScaleFields<
2253
3330
  };
2254
3331
 
2255
3332
  export type OpacityEncodingOptions =
2256
- | { value: number; field?: never; target?: string }
3333
+ | { value: number; field?: never; target?: string; fieldType?: never; scale?: never }
2257
3334
  | {
2258
3335
  field: string;
2259
3336
  value?: never;
@@ -2264,6 +3341,25 @@ export type OpacityEncodingOptions =
2264
3341
 
2265
3342
  export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions;
2266
3343
 
3344
+ export interface RuleStyleOptions {
3345
+ stroke?: string;
3346
+ strokeWidth?: number;
3347
+ strokeDash?: DashStyle | DashPattern;
3348
+ opacity?: number;
3349
+ }
3350
+
3351
+ type ReferenceAxis<Value> = { x: Value; y?: never } | { y: Value; x?: never };
3352
+ type ReferenceBinding<DataValue, PlotValue> =
3353
+ | ({ space?: "data"; source?: string; temporalUnit?: TemporalInputUnit;
3354
+ data?: never; coordinate?: never } & ReferenceAxis<DataValue>)
3355
+ | ({ space: "plot"; data?: string; coordinate?: string;
3356
+ source?: never; temporalUnit?: never } & ReferenceAxis<PlotValue>);
3357
+
3358
+ export type CreateReferenceLineOptions = { id?: string } & RuleStyleOptions &
3359
+ ReferenceBinding<unknown, number>;
3360
+ export type CreateReferenceBandOptions = Omit<RectMarkOptions, "data"> &
3361
+ ReferenceBinding<readonly [unknown, unknown], readonly [number, number]>;
3362
+
2267
3363
  export type StrokeWidthEncodingOptions =
2268
3364
  | {
2269
3365
  value: number;
@@ -2327,6 +3423,8 @@ type RegressionParameterOptions =
2327
3423
  method?: "linear";
2328
3424
  degree?: never;
2329
3425
  span?: never;
3426
+ confidenceMethod?: ConfidenceIntervalMethod;
3427
+ level?: number;
2330
3428
  confidence?: number;
2331
3429
  interval?: RegressionInterval;
2332
3430
  }
@@ -2334,6 +3432,8 @@ type RegressionParameterOptions =
2334
3432
  method: "polynomial";
2335
3433
  degree?: number;
2336
3434
  span?: never;
3435
+ confidenceMethod?: ConfidenceIntervalMethod;
3436
+ level?: number;
2337
3437
  confidence?: number;
2338
3438
  interval?: RegressionInterval;
2339
3439
  }
@@ -2341,6 +3441,8 @@ type RegressionParameterOptions =
2341
3441
  method: "loess";
2342
3442
  degree?: never;
2343
3443
  span?: number;
3444
+ confidenceMethod?: never;
3445
+ level?: never;
2344
3446
  confidence?: never;
2345
3447
  interval?: never;
2346
3448
  };
@@ -2357,7 +3459,7 @@ type RegressionCommonOptions = {
2357
3459
  target?: string;
2358
3460
  x?: string;
2359
3461
  y?: string;
2360
- groupBy?: string;
3462
+ groupBy?: string | false;
2361
3463
  line?: { strokeWidth?: number; curve?: CurveInterpolation };
2362
3464
  };
2363
3465
 
@@ -2382,6 +3484,8 @@ export interface EditRegressionOptions {
2382
3484
  method?: RegressionMethod;
2383
3485
  degree?: number;
2384
3486
  span?: number;
3487
+ confidenceMethod?: ConfidenceIntervalMethod;
3488
+ level?: number;
2385
3489
  confidence?: number;
2386
3490
  interval?: RegressionInterval;
2387
3491
  band?: false | RegressionBandOptions;
@@ -2402,6 +3506,7 @@ export interface RemoveGridOptions {
2402
3506
 
2403
3507
  export interface RemoveLegendOptions {
2404
3508
  target?: string;
3509
+ /** Remove selected content, including part of a combined categorical legend; omission removes every owned block. */
2405
3510
  channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
2406
3511
  }
2407
3512
 
@@ -2410,11 +3515,17 @@ export interface RemoveMarkOptions {
2410
3515
  }
2411
3516
 
2412
3517
  export interface LegendTextOptions {
3518
+ /** Gap after the occupied sample slot: categorical color/interval default 8; series 10; size/width 12.
3519
+ * Categorical slots include all recipe strokes and mapped shape extents.
3520
+ * Size retains a minimum 32px slot. Width includes the widest line stroke.
3521
+ * Opacity: visible circle-stroke gap, default 12 (inline 8). */
2413
3522
  offset?: number;
2414
3523
  color?: string;
2415
3524
  fontSize?: number;
2416
3525
  fontFamily?: string;
2417
3526
  fontWeight?: string | number;
3527
+ /** Continuous numeric/temporal label format. Categorical legends accept auto only. */
3528
+ format?: ValueFormat;
2418
3529
  }
2419
3530
 
2420
3531
  export interface LegendTitleStyleOptions {
@@ -2444,6 +3555,8 @@ export type LegendSymbolLayer =
2444
3555
 
2445
3556
  export type LegendSymbolRecipe =
2446
3557
  | "auto"
3558
+ /** Sampled opacity uses a single point recipe; radius defaults to 7 and must be positive. */
3559
+ | { type?: "point"; radius?: number; fill?: string; stroke?: string; strokeWidth?: number }
2447
3560
  | { length?: number; lineWidth?: number }
2448
3561
  | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
2449
3562
  | { layers: readonly LegendSymbolLayer[] };
@@ -2455,13 +3568,27 @@ export interface LegendBorderOptions {
2455
3568
  background?: string;
2456
3569
  }
2457
3570
 
3571
+ type LegendValueOrder = "scale" | { values: readonly CategoryValue[]; channel?: never };
3572
+ type CartesianLegendOrder = LegendValueOrder | { channel: "x" | "y"; values?: never };
3573
+ export type LegendOrder = LegendValueOrder |
3574
+ { channel: "x" | "y" | "theta"; values?: never };
3575
+
2458
3576
  export interface LegendOptions {
3577
+ /** Categorical, interval, size, or stroke-width layout. Defaults to edge; legacy-bottom is categorical and requires bottom position. */
3578
+ layout?: "edge" | "legacy-bottom";
3579
+ /** Categorical item order; preserves the appearance scale's assignments. */
3580
+ order?: LegendOrder;
2459
3581
  target?: string;
3582
+ /** Exact requested content; omission infers encoded point color/shape/size. Explicit subsets include size only when listed. */
2460
3583
  channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
2461
3584
  position?: "right" | "left" | "bottom" | "top";
3585
+ /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
2462
3586
  align?: "left" | "center" | "right";
3587
+ /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
2463
3588
  direction?: "horizontal" | "vertical";
3589
+ /** Categorical sides allow omission or 1; multiple columns require a horizontal edge. */
2464
3590
  columns?: number;
3591
+ /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
2465
3592
  offset?: number;
2466
3593
  titlePosition?: "top" | "left";
2467
3594
  title?: string;
@@ -2469,28 +3596,36 @@ export interface LegendOptions {
2469
3596
  gradient?: { length?: number; thickness?: number };
2470
3597
  symbol?: LegendSymbolRecipe;
2471
3598
  labels?: LegendTextOptions;
3599
+ /** New categorical+size blocks share typography on every edge; retained standalone size styles remain independent. */
2472
3600
  titleStyle?: LegendTitleStyleOptions;
2473
3601
  itemGap?: number;
2474
3602
  border?: boolean | LegendBorderOptions;
2475
3603
  }
2476
3604
 
2477
3605
  export interface EditLegendOptions
2478
- extends Omit<LegendOptions, "channels" | "title"> {
3606
+ extends Omit<LegendOptions, "title"> {
3607
+ /** Exact final content set for the whole target; omission preserves content. */
3608
+ channels?: LegendOptions["channels"];
2479
3609
  title?: string | "auto" | false;
2480
3610
  }
2481
3611
 
2482
3612
  export interface EditLegendLayoutOptions {
2483
3613
  target?: string;
3614
+ layout?: "edge" | "legacy-bottom";
2484
3615
  position?: "right" | "left" | "bottom" | "top";
3616
+ /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
2485
3617
  align?: "left" | "center" | "right";
3618
+ /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
2486
3619
  direction?: "horizontal" | "vertical";
3620
+ /** Categorical sides allow omission or 1; multiple columns require a horizontal edge. */
2487
3621
  columns?: number;
3622
+ /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
2488
3623
  offset?: number;
2489
3624
  titlePosition?: "top" | "left";
2490
3625
  itemGap?: number;
2491
3626
  }
2492
3627
 
2493
- export interface EditLegendLabelsOptions extends LegendTitleStyleOptions {
3628
+ export interface EditLegendLabelsOptions extends LegendTextOptions {
2494
3629
  target?: string;
2495
3630
  }
2496
3631
 
@@ -2556,11 +3691,11 @@ export type CategoryOrder =
2556
3691
  };
2557
3692
  export type OrderCategoriesOptions = {
2558
3693
  target?: string;
2559
- channel: "x" | "y";
3694
+ channel: "x" | "y" | "theta";
2560
3695
  } & CategoryOrder;
2561
3696
  export interface RemoveCategoryOrderOptions {
2562
3697
  target?: string;
2563
- channel: "x" | "y";
3698
+ channel: "x" | "y" | "theta";
2564
3699
  }
2565
3700
 
2566
3701
  export interface TitleOptions {
@@ -2599,17 +3734,28 @@ export class ChartProgram {
2599
3734
 
2600
3735
  createCanvas(options?: CanvasOptions): ChartProgram;
2601
3736
  editCanvas(options: CanvasOptions): ChartProgram;
3737
+ fitCanvas(options?: FitCanvasOptions): ChartProgram;
3738
+ applyTheme(options: ApplyThemeOptions): ChartProgram;
3739
+ removeTheme(): ChartProgram;
2602
3740
  createData(options: { id?: string; values: readonly unknown[] }): ChartProgram;
3741
+ bindMarkData(options: BindMarkDataOptions): ChartProgram;
2603
3742
  filterData(options: FilterDataOptions): ChartProgram;
2604
3743
  filterMarks(options: FilterMarksOptions): ChartProgram;
3744
+ removeMarkFilter(options?: RemoveMarkFilterOptions): ChartProgram;
2605
3745
  selectMarks(options: SelectMarksOptions): ChartProgram;
2606
3746
  editMarkSelection(options: EditMarkSelectionOptions): ChartProgram;
2607
3747
  removeMarkHighlight(options?: RemoveMarkSelectionOptions): ChartProgram;
2608
3748
  removeMarkSelection(options?: RemoveMarkSelectionOptions): ChartProgram;
2609
3749
  highlightMarks(options: HighlightMarksOptions): ChartProgram;
2610
3750
  createDensityData(options: DensityDataOptions): ChartProgram;
3751
+ createSummaryData(options: SummaryDataOptions): ChartProgram;
3752
+ createBinData(options: BinDataOptions): ChartProgram;
3753
+ createFoldData(options: FoldDataOptions): ChartProgram;
3754
+ createComputedData(options: ComputedDataOptions): ChartProgram;
3755
+ createStackData(options: StackDataOptions): ChartProgram;
2611
3756
  createRegressionData(options: RegressionDataOptions): ChartProgram;
2612
3757
  createIntervalData(options: IntervalDataOptions): ChartProgram;
3758
+ createECDFData(options: ECDFDataOptions): ChartProgram;
2613
3759
  createTimeUnitData(options: TimeUnitDataOptions): ChartProgram;
2614
3760
  createWindowData(options: WindowDataOptions): ChartProgram;
2615
3761
  createBin2DData(options: Bin2DDataOptions): ChartProgram;
@@ -2621,7 +3767,7 @@ export class ChartProgram {
2621
3767
  shape?: PointShape;
2622
3768
  fill?: string;
2623
3769
  opacity?: number;
2624
- stroke?: string;
3770
+ stroke?: FilledMarkStroke;
2625
3771
  strokeWidth?: number;
2626
3772
  }): ChartProgram;
2627
3773
  editPointMark(options: {
@@ -2629,7 +3775,7 @@ export class ChartProgram {
2629
3775
  shape?: PointShape;
2630
3776
  fill?: string;
2631
3777
  opacity?: number;
2632
- stroke?: string | false;
3778
+ stroke?: FilledMarkStroke;
2633
3779
  strokeWidth?: number;
2634
3780
  }): ChartProgram;
2635
3781
  createTickMark(options?: {
@@ -2649,6 +3795,8 @@ export class ChartProgram {
2649
3795
  }): ChartProgram;
2650
3796
  jitterPoints(options: JitterPointsOptions): ChartProgram;
2651
3797
  removeJitter(options?: RemoveJitterOptions): ChartProgram;
3798
+ packPoints(options: PackPointsOptions): ChartProgram;
3799
+ removePointPacking(options?: RemovePointPackingOptions): ChartProgram;
2652
3800
  createLineMark(options?: {
2653
3801
  id?: string;
2654
3802
  data?: string;
@@ -2671,14 +3819,14 @@ export class ChartProgram {
2671
3819
  data?: string;
2672
3820
  fill?: string;
2673
3821
  opacity?: number;
2674
- stroke?: string;
3822
+ stroke?: FilledMarkStroke;
2675
3823
  strokeWidth?: number;
2676
3824
  }): ChartProgram;
2677
3825
  editBarMark(options: {
2678
3826
  target?: string;
2679
3827
  fill?: string;
2680
3828
  opacity?: number;
2681
- stroke?: string | false;
3829
+ stroke?: FilledMarkStroke;
2682
3830
  strokeWidth?: number;
2683
3831
  }): ChartProgram;
2684
3832
  createAreaMark(options?: {
@@ -2689,6 +3837,7 @@ export class ChartProgram {
2689
3837
  stroke?: string;
2690
3838
  strokeWidth?: number;
2691
3839
  curve?: CurveInterpolation;
3840
+ missing?: "error" | "break";
2692
3841
  }): ChartProgram;
2693
3842
  createArcMark(options?: {
2694
3843
  id?: string;
@@ -2711,8 +3860,13 @@ export class ChartProgram {
2711
3860
  }): ChartProgram;
2712
3861
  createRectMark(options?: RectMarkOptions): ChartProgram;
2713
3862
  editRectMark(options: EditRectMarkOptions): ChartProgram;
2714
- createRuleMark(options?: { id?: string; data?: string }): ChartProgram;
3863
+ createRuleMark(options?: { id?: string; data?: string } & RuleStyleOptions): ChartProgram;
3864
+ editRuleMark(options: { target?: string } & RuleStyleOptions): ChartProgram;
2715
3865
  createTextMark(options?: TextMarkOptions): ChartProgram;
3866
+ createMarkLabels(options?: CreateMarkLabelsOptions): ChartProgram;
3867
+ createAnnotation(options: CreateAnnotationOptions): ChartProgram;
3868
+ createReferenceLine(options: CreateReferenceLineOptions): ChartProgram;
3869
+ createReferenceBand(options: CreateReferenceBandOptions): ChartProgram;
2716
3870
  editTextMark(options: EditTextMarkOptions): ChartProgram;
2717
3871
  layoutLabels(options?: LabelLayoutOptions): ChartProgram;
2718
3872
  removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
@@ -2723,10 +3877,11 @@ export class ChartProgram {
2723
3877
  stroke?: string | false;
2724
3878
  strokeWidth?: number;
2725
3879
  curve?: CurveInterpolation;
3880
+ missing?: "error" | "break";
2726
3881
  }): ChartProgram;
2727
3882
 
2728
- encodeX(options: PositionEncodingOptions | RulePositionEncodingOptions): ChartProgram;
2729
- encodeY(options: YPositionEncodingOptions | RulePositionEncodingOptions): ChartProgram;
3883
+ encodeX(options: PositionEncodingOptions | DatumPositionEncodingOptions): ChartProgram;
3884
+ encodeY(options: YPositionEncodingOptions | DatumPositionEncodingOptions): ChartProgram;
2730
3885
  encodeTheta(options: ThetaEncodingOptions): ChartProgram;
2731
3886
  encodeR(options: RadialEncodingOptions): ChartProgram;
2732
3887
  encodeX2(options: SecondaryPositionEncodingOptions): ChartProgram;
@@ -2745,23 +3900,10 @@ export class ChartProgram {
2745
3900
  encodeXOffset(options: XOffsetEncodingOptions): ChartProgram;
2746
3901
  encodeYOffset(options: YOffsetEncodingOptions): ChartProgram;
2747
3902
  encodeY2(options: SecondaryPositionEncodingOptions): ChartProgram;
2748
- encodeYRange(options: {
2749
- lower: string;
2750
- upper: string;
2751
- target?: string;
2752
- fieldType?: "quantitative";
2753
- coordinate?: string;
2754
- scale?: NonPointQuantitativePositionScaleOptions;
2755
- }): ChartProgram;
2756
- encodeXRange(options: {
2757
- lower: string;
2758
- upper: string;
2759
- target?: string;
2760
- fieldType?: "quantitative";
2761
- coordinate?: string;
2762
- scale?: NonPointQuantitativePositionScaleOptions;
2763
- }): ChartProgram;
2764
- encodeGroup(options: { field: string; target?: string; fieldType?: "nominal" }): ChartProgram;
3903
+ encodeYRange(options: RangePositionEncodingOptions): ChartProgram;
3904
+ encodeXRange(options: RangePositionEncodingOptions): ChartProgram;
3905
+ encodeGroup(options: GroupEncodingOptions): ChartProgram;
3906
+ layoutSeries(options: SeriesLayoutOptions): ChartProgram;
2765
3907
  encodePathOrder(options: PathOrderEncodingOptions): ChartProgram;
2766
3908
  orderCategories(options: OrderCategoriesOptions): ChartProgram;
2767
3909
  encodeParallelCoordinates(options: ParallelCoordinatesEncodingOptions): ChartProgram;
@@ -2796,18 +3938,54 @@ export class ChartProgram {
2796
3938
  createGradientPlot(options?: GradientPlotOptions): ChartProgram;
2797
3939
  editGradientPlot(options: EditGradientPlotOptions): ChartProgram;
2798
3940
  createViolinPlot(options: ViolinPlotOptions): ChartProgram;
3941
+ editViolinPlot(options: EditViolinPlotOptions): ChartProgram;
2799
3942
  createScatterPlot(options: CreateScatterPlotOptions): ChartProgram;
3943
+ createIntervalPlot(options: CreateIntervalPlotOptions): ChartProgram;
3944
+ createRegressionPlot(options: CreateRegressionPlotOptions): ChartProgram;
3945
+ createDotPlot(options: CreateDotPlotOptions): ChartProgram;
3946
+ createLollipopPlot(options: CreateLollipopPlotOptions): ChartProgram;
3947
+ createDumbbellPlot(options: CreateDumbbellPlotOptions): ChartProgram;
3948
+ editEndpointPlot(options: EditEndpointPlotOptions): ChartProgram;
3949
+ createECDFPlot(options: CreateECDFPlotOptions): ChartProgram;
3950
+ editECDFPlot(options: EditECDFPlotOptions): ChartProgram;
2800
3951
  createLinePlot(options: CreateLinePlotOptions): ChartProgram;
3952
+ createPolarScatterPlot(options: CreatePolarScatterPlotOptions): ChartProgram;
3953
+ createPolarLinePlot(options: CreatePolarLinePlotOptions): ChartProgram;
3954
+ createRadarPlot(options: CreateRadarPlotOptions): ChartProgram;
3955
+ createRugPlot(options: CreateRugPlotOptions): ChartProgram;
3956
+ createStripPlot(options: CreateStripPlotOptions): ChartProgram;
3957
+ createBeeswarmPlot(options: CreateBeeswarmPlotOptions): ChartProgram;
3958
+ createRaincloudPlot(options: CreateRaincloudPlotOptions): ChartProgram;
3959
+ editRaincloudPlot(options: EditRaincloudPlotOptions): ChartProgram;
3960
+ createAreaPlot(options: CreateAreaPlotOptions): ChartProgram;
2801
3961
  createBarPlot(options: CreateBarPlotOptions): ChartProgram;
2802
3962
  createHistogram(options: CreateHistogramOptions): ChartProgram;
3963
+ createPiePlot(options: CreatePiePlotOptions): ChartProgram;
3964
+ createRosePlot(options: CreateRosePlotOptions): ChartProgram;
3965
+ createRadialBarPlot(options: CreateRadialBarPlotOptions): ChartProgram;
3966
+ createDensityPlot(options: CreateDensityPlotOptions): ChartProgram;
3967
+ createHorizonPlot(options: CreateHorizonPlotOptions): ChartProgram;
2803
3968
  createHeatmap(options: CreateHeatmapOptions): ChartProgram;
2804
3969
  createParallelCoordinates(options: CreateParallelCoordinatesOptions): ChartProgram;
2805
3970
  removeMark(options?: RemoveMarkOptions): ChartProgram;
3971
+ createParallelAxes(options?: ParallelAxesOptions): ChartProgram;
3972
+ createParallelAxis(options: CreateParallelAxisOptions): ChartProgram;
3973
+ editParallelAxis(options: EditParallelAxisOptions): ChartProgram;
3974
+ removeParallelAxis(options: RemoveParallelAxisOptions): ChartProgram;
3975
+ removeParallelAxes(options?: ParallelAxesOptions): ChartProgram;
2806
3976
  createAxes(options?: CreateAxesOptions): ChartProgram;
2807
3977
  createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
2808
3978
  createYAxis(options?: CompleteAxisOptions<YAxisPosition>): ChartProgram;
2809
3979
  createThetaAxis(options?: CompletePolarAxisOptions): ChartProgram;
2810
3980
  createRadialAxis(options?: CompleteRadialAxisOptions): ChartProgram;
3981
+ createThetaAxisLine(options?: CreateThetaAxisLineOptions): ChartProgram;
3982
+ createRadialAxisLine(options?: CreateRadialAxisLineOptions): ChartProgram;
3983
+ createThetaAxisTicks(options?: CreateThetaAxisTicksOptions): ChartProgram;
3984
+ createRadialAxisTicks(options?: CreateRadialAxisTicksOptions): ChartProgram;
3985
+ createThetaAxisLabels(options?: CreateThetaAxisLabelsOptions): ChartProgram;
3986
+ createRadialAxisLabels(options?: CreateRadialAxisLabelsOptions): ChartProgram;
3987
+ createThetaAxisTitle(options?: CreateThetaAxisTitleOptions): ChartProgram;
3988
+ createRadialAxisTitle(options?: CreateRadialAxisTitleOptions): ChartProgram;
2811
3989
  editThetaAxisLine(options?: AxisLineStyleOptions): ChartProgram;
2812
3990
  editRadialAxisLine(options?: AxisLineStyleOptions): ChartProgram;
2813
3991
  editThetaAxisTicks(options?: PolarTickOptions): ChartProgram;
@@ -2855,6 +4033,7 @@ export class ChartProgram {
2855
4033
  editRadialGrid(options: EditPolarGridOptions): ChartProgram;
2856
4034
  editGrid(options: EditGridDirectionsOptions): ChartProgram;
2857
4035
  removeGrid(options?: RemoveGridOptions): ChartProgram;
4036
+ /** Combined categorical and size legends support all four edges with layout "edge". */
2858
4037
  createLegend(options?: LegendOptions): ChartProgram;
2859
4038
  editLegend(options: EditLegendOptions): ChartProgram;
2860
4039
  editLegendLayout(options: EditLegendLayoutOptions): ChartProgram;
@@ -2890,7 +4069,13 @@ export class ChartProgram {
2890
4069
 
2891
4070
  editCompositionLayout(options: EditCompositionLayoutOptions): ChartProgram;
2892
4071
  replaceCompositionChild(options: ReplaceCompositionChildOptions): ChartProgram;
4072
+ insertCompositionChild(options: InsertCompositionChildOptions): ChartProgram;
4073
+ removeCompositionChild(options: RemoveCompositionChildOptions): ChartProgram;
4074
+ reorderCompositionChildren(options: ReorderCompositionChildrenOptions): ChartProgram;
2893
4075
  facet(options: FacetOptions): ChartProgram;
4076
+ facetGrid(options: FacetGridOptions): ChartProgram;
4077
+ repeatCharts(options: RepeatChartsOptions): ChartProgram;
4078
+ editFacetSource(options: EditFacetSourceOptions): ChartProgram;
2894
4079
  editFacetScales(options: FacetScaleResolutions): ChartProgram;
2895
4080
  editFacetGuides(options: FacetGuideOptions): ChartProgram;
2896
4081
  editFacetHeaders(options: EditFacetHeadersOptions): ChartProgram;