ggaction 0.0.11 → 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 (289) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +3 -2
  3. package/knowledge/action-card.schema.json +1 -1
  4. package/knowledge/action-cards.json +1 -1
  5. package/knowledge/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 +33 -27
  65. package/src/actions/encodings/parallel.js +2 -8
  66. package/src/actions/encodings/position/apply.js +40 -4
  67. package/src/actions/encodings/position/index.js +43 -5
  68. package/src/actions/encodings/position/policies/arc.js +37 -2
  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 +79 -24
  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 +153 -11
  83. package/src/actions/errorBars/edit.js +365 -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 +138 -14
  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 +60 -4
  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/core/vocabulary.js +2 -2
  195. package/src/grammar/aggregate.js +66 -23
  196. package/src/grammar/arcs.js +213 -65
  197. package/src/grammar/areaEndpoints.js +46 -0
  198. package/src/grammar/areaSeries.js +87 -41
  199. package/src/grammar/bars/aggregate.js +33 -12
  200. package/src/grammar/bars/policy.js +9 -7
  201. package/src/grammar/bin.js +181 -0
  202. package/src/grammar/categoryOrder.js +34 -0
  203. package/src/grammar/computed.js +150 -0
  204. package/src/grammar/ecdf.js +198 -0
  205. package/src/grammar/facets/index.js +117 -6
  206. package/src/grammar/fold.js +123 -0
  207. package/src/grammar/horizon.js +6 -4
  208. package/src/grammar/interval.js +37 -20
  209. package/src/grammar/lineSeries.js +20 -63
  210. package/src/grammar/markFilter.js +22 -4
  211. package/src/grammar/markLabels.js +93 -0
  212. package/src/grammar/parallelAxisTitles.js +16 -0
  213. package/src/grammar/pathSeries.js +91 -0
  214. package/src/grammar/pointPacking.js +183 -0
  215. package/src/grammar/positionCompatibility.js +1 -1
  216. package/src/grammar/positionDatum.js +12 -0
  217. package/src/grammar/rects.js +9 -1
  218. package/src/grammar/regression/derive.js +4 -0
  219. package/src/grammar/regression/index.js +7 -2
  220. package/src/grammar/regression/models.js +22 -7
  221. package/src/grammar/regression/parameters.js +40 -13
  222. package/src/grammar/rotation.js +29 -0
  223. package/src/grammar/rules.js +9 -21
  224. package/src/grammar/scales/color.js +23 -1
  225. package/src/grammar/scales/colorConsumers.js +38 -0
  226. package/src/grammar/scales/definition.js +15 -1
  227. package/src/grammar/scales/discretized.js +11 -5
  228. package/src/grammar/scales/fields.js +38 -8
  229. package/src/grammar/scales/mapping.js +2 -0
  230. package/src/grammar/scales/ordinal.js +23 -0
  231. package/src/grammar/scales/radial.js +55 -0
  232. package/src/grammar/scales/types.js +1 -0
  233. package/src/grammar/schemas/semanticPath.js +17 -3
  234. package/src/grammar/stack.js +170 -0
  235. package/src/grammar/statistics/confidenceInterval.js +101 -0
  236. package/src/grammar/summary.js +183 -0
  237. package/src/grammar/text.js +22 -16
  238. package/src/grammar/timeUnit.js +21 -11
  239. package/src/grammar/transformTopology.js +6 -0
  240. package/src/grammar/transforms.js +36 -0
  241. package/src/grammar/valueFormat.js +112 -0
  242. package/src/grammar/window.js +13 -7
  243. package/src/layout/facets.js +86 -23
  244. package/src/layout/guideCollisions.js +12 -0
  245. package/src/layout/legend.js +2 -10
  246. package/src/layout/legendItems.js +102 -0
  247. package/src/layout/legendLane.js +100 -11
  248. package/src/materialization/bars/aggregate.js +38 -152
  249. package/src/materialization/bars/histogram.js +24 -0
  250. package/src/materialization/categorySlotOffset.js +40 -0
  251. package/src/materialization/compositionSnapshot.js +1 -1
  252. package/src/materialization/dependencies.js +57 -16
  253. package/src/materialization/encodings.js +1 -1
  254. package/src/materialization/facetGuides/legacyCategorical.js +7 -1
  255. package/src/materialization/facetGuides/placement.js +16 -1
  256. package/src/materialization/facetGuides/preparation.js +26 -1
  257. package/src/materialization/facets.js +11 -2
  258. package/src/materialization/guides/layout.js +57 -0
  259. package/src/materialization/guides/resources.js +2 -2
  260. package/src/materialization/legends.js +10 -1
  261. package/src/materialization/marks/capabilities.js +30 -7
  262. package/src/materialization/marks/grouping.js +52 -0
  263. package/src/materialization/marks/index.js +63 -25
  264. package/src/materialization/marks/policies.js +2 -0
  265. package/src/materialization/rect.js +33 -33
  266. package/src/materialization/rowEncoding.js +70 -14
  267. package/src/materialization/scaleGuideDependencies.js +8 -5
  268. package/src/materialization/scales/map.js +1 -0
  269. package/src/materialization/scales/policies/arc.js +42 -0
  270. package/src/materialization/scales/policies/bar.js +0 -43
  271. package/src/materialization/scales/policies/binnedPosition.js +7 -4
  272. package/src/materialization/scales/policies/offset.js +54 -0
  273. package/src/materialization/scales/policies/series.js +2 -1
  274. package/src/materialization/scales/resolve.js +48 -18
  275. package/src/materialization/selection/compatibility.js +11 -0
  276. package/src/materialization/selection/items/bar.js +12 -68
  277. package/src/materialization/selection/items/common.js +8 -2
  278. package/src/materialization/selection/items/path.js +3 -13
  279. package/src/materialization/selection/items/rect.js +7 -4
  280. package/src/materialization/text.js +64 -5
  281. package/src/mcp/adapter.js +2 -2
  282. package/src/selectors/datasets.js +13 -0
  283. package/src/selectors/layers.js +3 -2
  284. package/src/selectors/scales.js +6 -0
  285. package/src/theme/defaults.js +39 -0
  286. package/types/basic.d.ts +11 -2
  287. package/types/index.d.ts +126 -0
  288. package/types/program.d.ts +1327 -124
  289. 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,23 +1439,38 @@ export interface RadiusScaleOptions {
1115
1439
  constant?: number;
1116
1440
  }
1117
1441
 
1118
- export interface ThetaEncodingOptions {
1442
+ export type ThetaEncodingOptions = {
1443
+ /**
1444
+ * Arc marks interpret an aggregate-free quantitative field as per-row sector
1445
+ * weights. Categorical arc theta retains the count and weighted-sum modes.
1446
+ */
1119
1447
  field: string;
1120
1448
  target?: string;
1121
- fieldType?: FieldType;
1122
1449
  scale?: ThetaScaleOptions;
1123
1450
  coordinate?: string;
1124
1451
  aggregate?: "count" | "sum";
1125
1452
  weight?: string;
1126
- }
1453
+ } & (
1454
+ | { fieldType?: Exclude<FieldType, "temporal">; temporalUnit?: never }
1455
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit }
1456
+ );
1127
1457
 
1128
- export interface RadialEncodingOptions {
1129
- 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 = {
1130
1466
  target?: string;
1131
1467
  fieldType?: "quantitative";
1132
- scale?: RadiusScaleOptions;
1133
1468
  coordinate?: string;
1134
- }
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
+ );
1135
1474
 
1136
1475
  type RulePositionValue =
1137
1476
  | { field: string; datum?: never }
@@ -1153,7 +1492,7 @@ type InferredRuleDatumPositionEncodingOptions = {
1153
1492
  | NonPointCategoricalPositionScaleOptions;
1154
1493
  };
1155
1494
 
1156
- export type RulePositionEncodingOptions =
1495
+ export type DatumPositionEncodingOptions =
1157
1496
  | InferredRuleDatumPositionEncodingOptions
1158
1497
  | RulePositionEncodingBase & (
1159
1498
  | {
@@ -1162,6 +1501,7 @@ export type RulePositionEncodingOptions =
1162
1501
  }
1163
1502
  | {
1164
1503
  fieldType: "temporal";
1504
+ temporalUnit?: TemporalInputUnit;
1165
1505
  scale?: NonPointTemporalPositionScaleOptions;
1166
1506
  }
1167
1507
  | {
@@ -1170,21 +1510,45 @@ export type RulePositionEncodingOptions =
1170
1510
  }
1171
1511
  );
1172
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
+
1173
1520
  type SecondaryRulePositionEncodingOptions = RulePositionEncodingBase & {
1174
- fieldType: FieldType;
1175
1521
  scale?: { id?: string };
1176
- };
1522
+ } & (
1523
+ | { fieldType: Exclude<FieldType, "temporal">; temporalUnit?: never }
1524
+ | { fieldType: "temporal"; temporalUnit?: TemporalInputUnit }
1525
+ );
1177
1526
 
1178
1527
  export type SecondaryPositionEncodingOptions =
1179
1528
  | SecondaryRulePositionEncodingOptions
1180
- | {
1181
- field: string;
1182
- datum?: never;
1183
- target?: string;
1184
- fieldType?: "quantitative" | "temporal";
1185
- scale?: { id?: string };
1186
- coordinate?: string;
1187
- };
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
+ );
1188
1552
 
1189
1553
  export type HistogramEncodingOptions = {
1190
1554
  field: string;
@@ -1225,7 +1589,8 @@ export interface DensityDataOptions {
1225
1589
  as?: readonly [string, string];
1226
1590
  }
1227
1591
 
1228
- type DensityEncodingBase = Omit<DensityDataOptions, "id"> & {
1592
+ type DensityEncodingBase = Omit<DensityDataOptions, "id" | "groupBy"> & {
1593
+ groupBy?: string | false;
1229
1594
  target?: string;
1230
1595
  densityChannel?: "x" | "y";
1231
1596
  coordinate?: string;
@@ -1250,6 +1615,7 @@ export type HorizonXEncoding = { field: string } & (
1250
1615
  }
1251
1616
  | {
1252
1617
  fieldType: "temporal";
1618
+ temporalUnit?: TemporalInputUnit;
1253
1619
  scale?: NonPointTemporalPositionScaleOptions;
1254
1620
  }
1255
1621
  | {
@@ -1282,7 +1648,7 @@ export interface HorizonEncodingOptions {
1282
1648
  source?: string;
1283
1649
  x?: string | HorizonXEncoding;
1284
1650
  y?: string | HorizonYEncoding;
1285
- groupBy?: string;
1651
+ groupBy?: string | false;
1286
1652
  bands?: number;
1287
1653
  baseline?: number;
1288
1654
  extent?: "auto" | number;
@@ -1313,6 +1679,7 @@ export interface IntervalDataOptions {
1313
1679
  groupBy?: string | readonly string[];
1314
1680
  center?: IntervalCenter;
1315
1681
  extent?: IntervalExtent;
1682
+ method?: ConfidenceIntervalMethod;
1316
1683
  level?: number;
1317
1684
  as?: IntervalOutputFields;
1318
1685
  }
@@ -1325,12 +1692,75 @@ export interface WindowDataOptions {
1325
1692
  operations: readonly WindowOperation[];
1326
1693
  }
1327
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
+
1328
1705
  export interface TimeUnitDataOptions {
1329
1706
  id: string;
1330
1707
  source?: string;
1331
1708
  field: string;
1332
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;
1333
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;
1334
1764
  }
1335
1765
 
1336
1766
  export interface Bin2DDataOptions {
@@ -1364,14 +1794,20 @@ export type ErrorBarPositionChannel = { field?: string } & (
1364
1794
  }
1365
1795
  | {
1366
1796
  fieldType: "temporal";
1797
+ temporalUnit?: TemporalInputUnit;
1367
1798
  scale?: NonPointTemporalPositionScaleOptions;
1368
1799
  }
1800
+ | {
1801
+ fieldType: "quantitative";
1802
+ scale?: NonPointQuantitativePositionScaleOptions;
1803
+ }
1369
1804
  );
1370
1805
 
1371
1806
  export interface ErrorBarStatisticalIntervalChannel {
1372
1807
  field?: string;
1373
1808
  center?: IntervalCenter;
1374
1809
  extent?: IntervalExtent;
1810
+ method?: ConfidenceIntervalMethod;
1375
1811
  level?: number;
1376
1812
  scale?: NonPointQuantitativePositionScaleOptions;
1377
1813
  }
@@ -1387,13 +1823,23 @@ export type ErrorBarIntervalChannel =
1387
1823
  | ErrorBarStatisticalIntervalChannel
1388
1824
  | ErrorBarExplicitIntervalChannel;
1389
1825
 
1826
+ export interface ErrorBarOffsetChannel {
1827
+ field?: string;
1828
+ fieldType?: "nominal" | "ordinal";
1829
+ scale?: OffsetScaleOptions;
1830
+ paddingInner?: number;
1831
+ paddingOuter?: number;
1832
+ }
1833
+
1390
1834
  export interface ErrorBarOptions {
1391
1835
  id?: string;
1392
1836
  target?: string;
1393
1837
  data?: string;
1394
1838
  x?: ErrorBarPositionChannel | ErrorBarIntervalChannel;
1395
1839
  y?: ErrorBarPositionChannel | ErrorBarIntervalChannel;
1396
- groupBy?: string;
1840
+ xOffset?: ErrorBarOffsetChannel;
1841
+ yOffset?: ErrorBarOffsetChannel;
1842
+ groupBy?: string | false;
1397
1843
  coordinate?: string;
1398
1844
  caps?: boolean;
1399
1845
  capSize?: number;
@@ -1405,6 +1851,12 @@ export interface ErrorBarOptions {
1405
1851
 
1406
1852
  export interface EditErrorBarOptions {
1407
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;
1408
1860
  caps?: boolean;
1409
1861
  capSize?: number;
1410
1862
  stroke?: string;
@@ -1414,6 +1866,7 @@ export interface EditErrorBarOptions {
1414
1866
  statistics?: {
1415
1867
  center?: IntervalCenter;
1416
1868
  extent?: IntervalExtent;
1869
+ method?: ConfidenceIntervalMethod;
1417
1870
  level?: number;
1418
1871
  };
1419
1872
  }
@@ -1463,7 +1916,7 @@ export interface BoxPlotOptions {
1463
1916
  radius?: number;
1464
1917
  opacity?: number;
1465
1918
  };
1466
- guides?: false | CartesianGuideOptions;
1919
+ guides?: false | BoxPlotGuideOptions;
1467
1920
  }
1468
1921
 
1469
1922
  export interface EditBoxPlotOptions {
@@ -1549,6 +2002,7 @@ export type ViolinPlotPositionChannel =
1549
2002
  export interface ViolinPlotDensityOptions
1550
2003
  extends GradientPlotDensityOptions {
1551
2004
  width?: DensityPlacementWidth;
2005
+ side?: "both" | "left" | "right" | "top" | "bottom";
1552
2006
  }
1553
2007
 
1554
2008
  export interface ViolinPlotSplitOptions {
@@ -1584,7 +2038,16 @@ export interface ViolinPlotOptions {
1584
2038
  color?: ViolinPlotColorOptions;
1585
2039
  density?: ViolinPlotDensityOptions;
1586
2040
  area?: ViolinPlotAreaOptions;
1587
- 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;
1588
2051
  }
1589
2052
 
1590
2053
  export interface EditGradientPlotOptions {
@@ -1611,6 +2074,7 @@ type PointFacadePositionChannel =
1611
2074
  }
1612
2075
  | {
1613
2076
  fieldType: "temporal";
2077
+ temporalUnit?: TemporalInputUnit;
1614
2078
  scale?: TemporalPositionScaleOptions;
1615
2079
  }
1616
2080
  | {
@@ -1627,6 +2091,7 @@ type LineXPositionChannel =
1627
2091
  }
1628
2092
  | {
1629
2093
  fieldType: "temporal";
2094
+ temporalUnit?: TemporalInputUnit;
1630
2095
  scale?: NonPointTemporalPositionScaleOptions;
1631
2096
  }
1632
2097
  ));
@@ -1640,6 +2105,7 @@ type LineYPositionChannel =
1640
2105
  }
1641
2106
  | {
1642
2107
  fieldType: "temporal";
2108
+ temporalUnit?: TemporalInputUnit;
1643
2109
  aggregate?: never;
1644
2110
  scale?: NonPointTemporalPositionScaleOptions;
1645
2111
  }
@@ -1651,6 +2117,14 @@ type BandPositionChannel = FacadePositionChannel<
1651
2117
  >;
1652
2118
  type BarYPositionChannel =
1653
2119
  | string
2120
+ | {
2121
+ field: string;
2122
+ fieldType: "temporal";
2123
+ temporalUnit?: TemporalInputUnit;
2124
+ aggregate?: never;
2125
+ stack?: never;
2126
+ scale?: NonPointTemporalPositionScaleOptions;
2127
+ }
1654
2128
  | ({ field: string; stack?: StackMode } & (
1655
2129
  | {
1656
2130
  fieldType?: "quantitative";
@@ -1685,7 +2159,8 @@ type BasicColorChannel =
1685
2159
  | {
1686
2160
  field: string;
1687
2161
  fieldType: "temporal";
1688
- scale?: ContinuousColorScaleOptions;
2162
+ temporalUnit?: TemporalInputUnit;
2163
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
1689
2164
  palette?: Palette;
1690
2165
  };
1691
2166
  type NonPointCategoricalColorChannel =
@@ -1749,7 +2224,8 @@ type RectColorChannel =
1749
2224
  | {
1750
2225
  field: string;
1751
2226
  fieldType: "temporal";
1752
- scale?: NonPointContinuousColorScaleOptions;
2227
+ temporalUnit?: TemporalInputUnit;
2228
+ scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
1753
2229
  palette?: Palette;
1754
2230
  };
1755
2231
  export type BasicSizeChannel = string | {
@@ -1823,39 +2299,505 @@ export interface CreateScatterPlotOptions {
1823
2299
  size?: BasicSizeChannel;
1824
2300
  shape?: BasicShapeChannel;
1825
2301
  point?: {
2302
+ radius?: number;
1826
2303
  shape?: PointShape;
1827
2304
  fill?: string;
1828
2305
  opacity?: number;
1829
- stroke?: string;
2306
+ stroke?: FilledMarkStroke;
1830
2307
  strokeWidth?: number;
1831
2308
  };
1832
- guides?: false | CreateGuidesOptions;
2309
+ guides?: false | CartesianGuideOptions;
1833
2310
  }
1834
2311
 
1835
- export interface CreateLinePlotOptions {
2312
+ export interface IntervalPlotErrorBarOptions {
2313
+ caps?: boolean;
2314
+ capSize?: number;
2315
+ stroke?: string;
2316
+ strokeWidth?: number;
2317
+ strokeDash?: DashStyle | DashPattern;
2318
+ opacity?: number;
2319
+ }
2320
+ type IntervalPlotBaseOptions = {
1836
2321
  id?: string;
1837
2322
  data?: string;
1838
2323
  coordinate?: string;
1839
- x: LineXPositionChannel;
1840
- y: LineYPositionChannel;
1841
- color?: LineCategoricalColorChannel;
1842
- groupBy?: string;
1843
- strokeDash?: BasicStrokeDashChannel;
1844
- line?: {
1845
- strokeWidth?: number;
1846
- curve?: CurveInterpolation;
1847
- stroke?: string;
1848
- opacity?: number;
1849
- closed?: false;
1850
- };
1851
- guides?: false | CreateGuidesOptions;
1852
- }
1853
-
1854
- type BasicHistogramEncoding =
1855
- HistogramEncodingOptions extends infer T
1856
- ? T extends unknown
1857
- ? Omit<T, "field" | "target" | "coordinate" | "stack"> & {
1858
- stack?: Exclude<StackMode, "center">;
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;
2657
+ fill?: string;
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;
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">;
1859
2801
  }
1860
2802
  : never
1861
2803
  : never;
@@ -1871,10 +2813,10 @@ export interface CreateBarPlotOptions {
1871
2813
  bar?: {
1872
2814
  fill?: string;
1873
2815
  opacity?: number;
1874
- stroke?: string;
2816
+ stroke?: FilledMarkStroke;
1875
2817
  strokeWidth?: number;
1876
2818
  };
1877
- guides?: false | CreateGuidesOptions;
2819
+ guides?: false | CartesianGuideOptions;
1878
2820
  }
1879
2821
 
1880
2822
  export type CreateHistogramOptions = BasicHistogramEncoding & {
@@ -1886,12 +2828,106 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
1886
2828
  bar?: {
1887
2829
  fill?: string;
1888
2830
  opacity?: number;
1889
- stroke?: string;
2831
+ stroke?: FilledMarkStroke;
1890
2832
  strokeWidth?: number;
1891
2833
  };
1892
- guides?: false | CreateGuidesOptions;
2834
+ guides?: false | CartesianCategoricalGuideOptions;
1893
2835
  };
1894
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;
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;
2930
+
1895
2931
  export interface HeatmapBaseOptions {
1896
2932
  id?: string;
1897
2933
  data?: string;
@@ -1956,6 +2992,7 @@ export type ErrorBandPositionChannel = { field?: string } & (
1956
2992
  }
1957
2993
  | {
1958
2994
  fieldType: "temporal";
2995
+ temporalUnit?: TemporalInputUnit;
1959
2996
  scale?: NonPointTemporalPositionScaleOptions;
1960
2997
  }
1961
2998
  );
@@ -1964,6 +3001,7 @@ export interface ErrorBandStatisticalIntervalChannel {
1964
3001
  field?: string;
1965
3002
  center?: IntervalCenter;
1966
3003
  extent?: IntervalExtent;
3004
+ method?: ConfidenceIntervalMethod;
1967
3005
  level?: number;
1968
3006
  scale?: NonPointQuantitativePositionScaleOptions;
1969
3007
  }
@@ -2001,12 +3039,17 @@ export interface ErrorBandOptions {
2001
3039
 
2002
3040
  export interface EditErrorBandOptions {
2003
3041
  target?: string;
2004
- fill?: string;
3042
+ data?: string;
3043
+ x?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3044
+ y?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
3045
+ groupBy?: string | false;
3046
+ fill?: string | false;
2005
3047
  opacity?: number;
2006
3048
  curve?: CurveInterpolation;
2007
3049
  statistics?: {
2008
3050
  center?: IntervalCenter;
2009
3051
  extent?: IntervalExtent;
3052
+ method?: ConfidenceIntervalMethod;
2010
3053
  level?: number;
2011
3054
  };
2012
3055
  boundaries?: false | {
@@ -2038,6 +3081,8 @@ export interface EditDensityOptions {
2038
3081
  steps?: number;
2039
3082
  kernel?: DensityKernel;
2040
3083
  normalization?: DensityNormalization;
3084
+ densityChannel?: "x" | "y";
3085
+ valueScale?: NonPointQuantitativePositionScaleOptions;
2041
3086
  placement?: DensityPlacement;
2042
3087
  }
2043
3088
 
@@ -2060,11 +3105,13 @@ export interface OffsetEncodingOptions {
2060
3105
  export interface XOffsetEncodingOptions extends OffsetEncodingOptions {}
2061
3106
  export interface YOffsetEncodingOptions extends OffsetEncodingOptions {}
2062
3107
 
2063
- export type TextFormat = "auto" | `.${number}f`;
3108
+ export type TextFormat = ValueFormat;
2064
3109
 
2065
3110
  export interface TextMarkOptions {
2066
3111
  id?: string;
2067
3112
  data?: string;
3113
+ /** Explicit source mark. Mutually exclusive with data; may be incomplete. */
3114
+ source?: string;
2068
3115
  text?: unknown;
2069
3116
  fill?: string;
2070
3117
  opacity?: number;
@@ -2073,12 +3120,12 @@ export interface TextMarkOptions {
2073
3120
  fontWeight?: string | number;
2074
3121
  align?: "left" | "right" | "center" | "start" | "end";
2075
3122
  baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
2076
- rotation?: number;
3123
+ rotation?: RotationInput;
2077
3124
  dx?: number;
2078
3125
  dy?: number;
2079
3126
  }
2080
3127
 
2081
- export interface EditTextMarkOptions extends Omit<TextMarkOptions, "id" | "data" | "text"> {
3128
+ export interface EditTextMarkOptions extends Omit<TextMarkOptions, "id" | "data" | "source" | "text"> {
2082
3129
  target?: string;
2083
3130
  }
2084
3131
 
@@ -2122,10 +3169,57 @@ export type TextEncodingOptions = {
2122
3169
  target?: string;
2123
3170
  format?: TextFormat;
2124
3171
  } & (
2125
- | { field: string; value?: never }
2126
- | { 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" }
2127
3176
  );
2128
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 }
3186
+ );
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
+
2129
3223
  export type BarWidthOptions = { target?: string } & (
2130
3224
  | { band?: number; pixels?: never }
2131
3225
  | { band?: never; pixels: number }
@@ -2155,7 +3249,7 @@ export type StrokeDashEncodingOptions =
2155
3249
  };
2156
3250
 
2157
3251
  export type NonPointContinuousColorScaleOptions = ScaleFields<
2158
- "id" | "interpolate" | "clamp" | "reverse"
3252
+ "id" | "interpolate" | "midpoint" | "clamp" | "reverse"
2159
3253
  > & {
2160
3254
  type?: "sequential";
2161
3255
  domain?: "auto" | readonly [unknown, unknown];
@@ -2219,8 +3313,9 @@ export type ColorEncodingOptions =
2219
3313
  field: string;
2220
3314
  target?: string;
2221
3315
  fieldType: "temporal";
3316
+ temporalUnit?: TemporalInputUnit;
2222
3317
  aggregate?: never;
2223
- scale?: ContinuousColorScaleOptions;
3318
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & { midpoint?: "auto" };
2224
3319
  palette?: Palette;
2225
3320
  layout?: never;
2226
3321
  };
@@ -2235,7 +3330,7 @@ export type OpacityScaleOptions = ScaleFields<
2235
3330
  };
2236
3331
 
2237
3332
  export type OpacityEncodingOptions =
2238
- | { value: number; field?: never; target?: string }
3333
+ | { value: number; field?: never; target?: string; fieldType?: never; scale?: never }
2239
3334
  | {
2240
3335
  field: string;
2241
3336
  value?: never;
@@ -2246,6 +3341,25 @@ export type OpacityEncodingOptions =
2246
3341
 
2247
3342
  export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions;
2248
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
+
2249
3363
  export type StrokeWidthEncodingOptions =
2250
3364
  | {
2251
3365
  value: number;
@@ -2309,6 +3423,8 @@ type RegressionParameterOptions =
2309
3423
  method?: "linear";
2310
3424
  degree?: never;
2311
3425
  span?: never;
3426
+ confidenceMethod?: ConfidenceIntervalMethod;
3427
+ level?: number;
2312
3428
  confidence?: number;
2313
3429
  interval?: RegressionInterval;
2314
3430
  }
@@ -2316,6 +3432,8 @@ type RegressionParameterOptions =
2316
3432
  method: "polynomial";
2317
3433
  degree?: number;
2318
3434
  span?: never;
3435
+ confidenceMethod?: ConfidenceIntervalMethod;
3436
+ level?: number;
2319
3437
  confidence?: number;
2320
3438
  interval?: RegressionInterval;
2321
3439
  }
@@ -2323,6 +3441,8 @@ type RegressionParameterOptions =
2323
3441
  method: "loess";
2324
3442
  degree?: never;
2325
3443
  span?: number;
3444
+ confidenceMethod?: never;
3445
+ level?: never;
2326
3446
  confidence?: never;
2327
3447
  interval?: never;
2328
3448
  };
@@ -2339,7 +3459,7 @@ type RegressionCommonOptions = {
2339
3459
  target?: string;
2340
3460
  x?: string;
2341
3461
  y?: string;
2342
- groupBy?: string;
3462
+ groupBy?: string | false;
2343
3463
  line?: { strokeWidth?: number; curve?: CurveInterpolation };
2344
3464
  };
2345
3465
 
@@ -2364,6 +3484,8 @@ export interface EditRegressionOptions {
2364
3484
  method?: RegressionMethod;
2365
3485
  degree?: number;
2366
3486
  span?: number;
3487
+ confidenceMethod?: ConfidenceIntervalMethod;
3488
+ level?: number;
2367
3489
  confidence?: number;
2368
3490
  interval?: RegressionInterval;
2369
3491
  band?: false | RegressionBandOptions;
@@ -2384,6 +3506,7 @@ export interface RemoveGridOptions {
2384
3506
 
2385
3507
  export interface RemoveLegendOptions {
2386
3508
  target?: string;
3509
+ /** Remove selected content, including part of a combined categorical legend; omission removes every owned block. */
2387
3510
  channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
2388
3511
  }
2389
3512
 
@@ -2392,11 +3515,17 @@ export interface RemoveMarkOptions {
2392
3515
  }
2393
3516
 
2394
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). */
2395
3522
  offset?: number;
2396
3523
  color?: string;
2397
3524
  fontSize?: number;
2398
3525
  fontFamily?: string;
2399
3526
  fontWeight?: string | number;
3527
+ /** Continuous numeric/temporal label format. Categorical legends accept auto only. */
3528
+ format?: ValueFormat;
2400
3529
  }
2401
3530
 
2402
3531
  export interface LegendTitleStyleOptions {
@@ -2426,6 +3555,8 @@ export type LegendSymbolLayer =
2426
3555
 
2427
3556
  export type LegendSymbolRecipe =
2428
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 }
2429
3560
  | { length?: number; lineWidth?: number }
2430
3561
  | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
2431
3562
  | { layers: readonly LegendSymbolLayer[] };
@@ -2437,13 +3568,27 @@ export interface LegendBorderOptions {
2437
3568
  background?: string;
2438
3569
  }
2439
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
+
2440
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;
2441
3581
  target?: string;
3582
+ /** Exact requested content; omission infers encoded point color/shape/size. Explicit subsets include size only when listed. */
2442
3583
  channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
2443
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. */
2444
3586
  align?: "left" | "center" | "right";
3587
+ /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
2445
3588
  direction?: "horizontal" | "vertical";
3589
+ /** Categorical sides allow omission or 1; multiple columns require a horizontal edge. */
2446
3590
  columns?: number;
3591
+ /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
2447
3592
  offset?: number;
2448
3593
  titlePosition?: "top" | "left";
2449
3594
  title?: string;
@@ -2451,28 +3596,36 @@ export interface LegendOptions {
2451
3596
  gradient?: { length?: number; thickness?: number };
2452
3597
  symbol?: LegendSymbolRecipe;
2453
3598
  labels?: LegendTextOptions;
3599
+ /** New categorical+size blocks share typography on every edge; retained standalone size styles remain independent. */
2454
3600
  titleStyle?: LegendTitleStyleOptions;
2455
3601
  itemGap?: number;
2456
3602
  border?: boolean | LegendBorderOptions;
2457
3603
  }
2458
3604
 
2459
3605
  export interface EditLegendOptions
2460
- 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"];
2461
3609
  title?: string | "auto" | false;
2462
3610
  }
2463
3611
 
2464
3612
  export interface EditLegendLayoutOptions {
2465
3613
  target?: string;
3614
+ layout?: "edge" | "legacy-bottom";
2466
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. */
2467
3617
  align?: "left" | "center" | "right";
3618
+ /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
2468
3619
  direction?: "horizontal" | "vertical";
3620
+ /** Categorical sides allow omission or 1; multiple columns require a horizontal edge. */
2469
3621
  columns?: number;
3622
+ /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
2470
3623
  offset?: number;
2471
3624
  titlePosition?: "top" | "left";
2472
3625
  itemGap?: number;
2473
3626
  }
2474
3627
 
2475
- export interface EditLegendLabelsOptions extends LegendTitleStyleOptions {
3628
+ export interface EditLegendLabelsOptions extends LegendTextOptions {
2476
3629
  target?: string;
2477
3630
  }
2478
3631
 
@@ -2538,11 +3691,11 @@ export type CategoryOrder =
2538
3691
  };
2539
3692
  export type OrderCategoriesOptions = {
2540
3693
  target?: string;
2541
- channel: "x" | "y";
3694
+ channel: "x" | "y" | "theta";
2542
3695
  } & CategoryOrder;
2543
3696
  export interface RemoveCategoryOrderOptions {
2544
3697
  target?: string;
2545
- channel: "x" | "y";
3698
+ channel: "x" | "y" | "theta";
2546
3699
  }
2547
3700
 
2548
3701
  export interface TitleOptions {
@@ -2581,17 +3734,28 @@ export class ChartProgram {
2581
3734
 
2582
3735
  createCanvas(options?: CanvasOptions): ChartProgram;
2583
3736
  editCanvas(options: CanvasOptions): ChartProgram;
3737
+ fitCanvas(options?: FitCanvasOptions): ChartProgram;
3738
+ applyTheme(options: ApplyThemeOptions): ChartProgram;
3739
+ removeTheme(): ChartProgram;
2584
3740
  createData(options: { id?: string; values: readonly unknown[] }): ChartProgram;
3741
+ bindMarkData(options: BindMarkDataOptions): ChartProgram;
2585
3742
  filterData(options: FilterDataOptions): ChartProgram;
2586
3743
  filterMarks(options: FilterMarksOptions): ChartProgram;
3744
+ removeMarkFilter(options?: RemoveMarkFilterOptions): ChartProgram;
2587
3745
  selectMarks(options: SelectMarksOptions): ChartProgram;
2588
3746
  editMarkSelection(options: EditMarkSelectionOptions): ChartProgram;
2589
3747
  removeMarkHighlight(options?: RemoveMarkSelectionOptions): ChartProgram;
2590
3748
  removeMarkSelection(options?: RemoveMarkSelectionOptions): ChartProgram;
2591
3749
  highlightMarks(options: HighlightMarksOptions): ChartProgram;
2592
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;
2593
3756
  createRegressionData(options: RegressionDataOptions): ChartProgram;
2594
3757
  createIntervalData(options: IntervalDataOptions): ChartProgram;
3758
+ createECDFData(options: ECDFDataOptions): ChartProgram;
2595
3759
  createTimeUnitData(options: TimeUnitDataOptions): ChartProgram;
2596
3760
  createWindowData(options: WindowDataOptions): ChartProgram;
2597
3761
  createBin2DData(options: Bin2DDataOptions): ChartProgram;
@@ -2603,7 +3767,7 @@ export class ChartProgram {
2603
3767
  shape?: PointShape;
2604
3768
  fill?: string;
2605
3769
  opacity?: number;
2606
- stroke?: string;
3770
+ stroke?: FilledMarkStroke;
2607
3771
  strokeWidth?: number;
2608
3772
  }): ChartProgram;
2609
3773
  editPointMark(options: {
@@ -2611,7 +3775,7 @@ export class ChartProgram {
2611
3775
  shape?: PointShape;
2612
3776
  fill?: string;
2613
3777
  opacity?: number;
2614
- stroke?: string | false;
3778
+ stroke?: FilledMarkStroke;
2615
3779
  strokeWidth?: number;
2616
3780
  }): ChartProgram;
2617
3781
  createTickMark(options?: {
@@ -2631,6 +3795,8 @@ export class ChartProgram {
2631
3795
  }): ChartProgram;
2632
3796
  jitterPoints(options: JitterPointsOptions): ChartProgram;
2633
3797
  removeJitter(options?: RemoveJitterOptions): ChartProgram;
3798
+ packPoints(options: PackPointsOptions): ChartProgram;
3799
+ removePointPacking(options?: RemovePointPackingOptions): ChartProgram;
2634
3800
  createLineMark(options?: {
2635
3801
  id?: string;
2636
3802
  data?: string;
@@ -2653,14 +3819,14 @@ export class ChartProgram {
2653
3819
  data?: string;
2654
3820
  fill?: string;
2655
3821
  opacity?: number;
2656
- stroke?: string;
3822
+ stroke?: FilledMarkStroke;
2657
3823
  strokeWidth?: number;
2658
3824
  }): ChartProgram;
2659
3825
  editBarMark(options: {
2660
3826
  target?: string;
2661
3827
  fill?: string;
2662
3828
  opacity?: number;
2663
- stroke?: string | false;
3829
+ stroke?: FilledMarkStroke;
2664
3830
  strokeWidth?: number;
2665
3831
  }): ChartProgram;
2666
3832
  createAreaMark(options?: {
@@ -2671,6 +3837,7 @@ export class ChartProgram {
2671
3837
  stroke?: string;
2672
3838
  strokeWidth?: number;
2673
3839
  curve?: CurveInterpolation;
3840
+ missing?: "error" | "break";
2674
3841
  }): ChartProgram;
2675
3842
  createArcMark(options?: {
2676
3843
  id?: string;
@@ -2693,8 +3860,13 @@ export class ChartProgram {
2693
3860
  }): ChartProgram;
2694
3861
  createRectMark(options?: RectMarkOptions): ChartProgram;
2695
3862
  editRectMark(options: EditRectMarkOptions): ChartProgram;
2696
- createRuleMark(options?: { id?: string; data?: string }): ChartProgram;
3863
+ createRuleMark(options?: { id?: string; data?: string } & RuleStyleOptions): ChartProgram;
3864
+ editRuleMark(options: { target?: string } & RuleStyleOptions): ChartProgram;
2697
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;
2698
3870
  editTextMark(options: EditTextMarkOptions): ChartProgram;
2699
3871
  layoutLabels(options?: LabelLayoutOptions): ChartProgram;
2700
3872
  removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
@@ -2705,10 +3877,11 @@ export class ChartProgram {
2705
3877
  stroke?: string | false;
2706
3878
  strokeWidth?: number;
2707
3879
  curve?: CurveInterpolation;
3880
+ missing?: "error" | "break";
2708
3881
  }): ChartProgram;
2709
3882
 
2710
- encodeX(options: PositionEncodingOptions | RulePositionEncodingOptions): ChartProgram;
2711
- encodeY(options: YPositionEncodingOptions | RulePositionEncodingOptions): ChartProgram;
3883
+ encodeX(options: PositionEncodingOptions | DatumPositionEncodingOptions): ChartProgram;
3884
+ encodeY(options: YPositionEncodingOptions | DatumPositionEncodingOptions): ChartProgram;
2712
3885
  encodeTheta(options: ThetaEncodingOptions): ChartProgram;
2713
3886
  encodeR(options: RadialEncodingOptions): ChartProgram;
2714
3887
  encodeX2(options: SecondaryPositionEncodingOptions): ChartProgram;
@@ -2727,23 +3900,10 @@ export class ChartProgram {
2727
3900
  encodeXOffset(options: XOffsetEncodingOptions): ChartProgram;
2728
3901
  encodeYOffset(options: YOffsetEncodingOptions): ChartProgram;
2729
3902
  encodeY2(options: SecondaryPositionEncodingOptions): ChartProgram;
2730
- encodeYRange(options: {
2731
- lower: string;
2732
- upper: string;
2733
- target?: string;
2734
- fieldType?: "quantitative";
2735
- coordinate?: string;
2736
- scale?: NonPointQuantitativePositionScaleOptions;
2737
- }): ChartProgram;
2738
- encodeXRange(options: {
2739
- lower: string;
2740
- upper: string;
2741
- target?: string;
2742
- fieldType?: "quantitative";
2743
- coordinate?: string;
2744
- scale?: NonPointQuantitativePositionScaleOptions;
2745
- }): ChartProgram;
2746
- 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;
2747
3907
  encodePathOrder(options: PathOrderEncodingOptions): ChartProgram;
2748
3908
  orderCategories(options: OrderCategoriesOptions): ChartProgram;
2749
3909
  encodeParallelCoordinates(options: ParallelCoordinatesEncodingOptions): ChartProgram;
@@ -2778,18 +3938,54 @@ export class ChartProgram {
2778
3938
  createGradientPlot(options?: GradientPlotOptions): ChartProgram;
2779
3939
  editGradientPlot(options: EditGradientPlotOptions): ChartProgram;
2780
3940
  createViolinPlot(options: ViolinPlotOptions): ChartProgram;
3941
+ editViolinPlot(options: EditViolinPlotOptions): ChartProgram;
2781
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;
2782
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;
2783
3961
  createBarPlot(options: CreateBarPlotOptions): ChartProgram;
2784
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;
2785
3968
  createHeatmap(options: CreateHeatmapOptions): ChartProgram;
2786
3969
  createParallelCoordinates(options: CreateParallelCoordinatesOptions): ChartProgram;
2787
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;
2788
3976
  createAxes(options?: CreateAxesOptions): ChartProgram;
2789
3977
  createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
2790
3978
  createYAxis(options?: CompleteAxisOptions<YAxisPosition>): ChartProgram;
2791
3979
  createThetaAxis(options?: CompletePolarAxisOptions): ChartProgram;
2792
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;
2793
3989
  editThetaAxisLine(options?: AxisLineStyleOptions): ChartProgram;
2794
3990
  editRadialAxisLine(options?: AxisLineStyleOptions): ChartProgram;
2795
3991
  editThetaAxisTicks(options?: PolarTickOptions): ChartProgram;
@@ -2837,6 +4033,7 @@ export class ChartProgram {
2837
4033
  editRadialGrid(options: EditPolarGridOptions): ChartProgram;
2838
4034
  editGrid(options: EditGridDirectionsOptions): ChartProgram;
2839
4035
  removeGrid(options?: RemoveGridOptions): ChartProgram;
4036
+ /** Combined categorical and size legends support all four edges with layout "edge". */
2840
4037
  createLegend(options?: LegendOptions): ChartProgram;
2841
4038
  editLegend(options: EditLegendOptions): ChartProgram;
2842
4039
  editLegendLayout(options: EditLegendLayoutOptions): ChartProgram;
@@ -2872,7 +4069,13 @@ export class ChartProgram {
2872
4069
 
2873
4070
  editCompositionLayout(options: EditCompositionLayoutOptions): ChartProgram;
2874
4071
  replaceCompositionChild(options: ReplaceCompositionChildOptions): ChartProgram;
4072
+ insertCompositionChild(options: InsertCompositionChildOptions): ChartProgram;
4073
+ removeCompositionChild(options: RemoveCompositionChildOptions): ChartProgram;
4074
+ reorderCompositionChildren(options: ReorderCompositionChildrenOptions): ChartProgram;
2875
4075
  facet(options: FacetOptions): ChartProgram;
4076
+ facetGrid(options: FacetGridOptions): ChartProgram;
4077
+ repeatCharts(options: RepeatChartsOptions): ChartProgram;
4078
+ editFacetSource(options: EditFacetSourceOptions): ChartProgram;
2876
4079
  editFacetScales(options: FacetScaleResolutions): ChartProgram;
2877
4080
  editFacetGuides(options: FacetGuideOptions): ChartProgram;
2878
4081
  editFacetHeaders(options: EditFacetHeadersOptions): ChartProgram;