@uwdata/mosaic-spec 0.7.0 → 0.8.0

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 (154) hide show
  1. package/dist/mosaic-schema.json +186153 -0
  2. package/dist/mosaic-spec.js +3387 -4641
  3. package/dist/mosaic-spec.min.js +23 -23
  4. package/dist/types/ast/ASTNode.d.ts +26 -0
  5. package/dist/types/ast/DataNode.d.ts +60 -0
  6. package/dist/types/ast/ExpressionNode.d.ts +15 -0
  7. package/dist/types/ast/HConcatNode.d.ts +10 -0
  8. package/dist/types/ast/HSpaceNode.d.ts +11 -0
  9. package/dist/types/ast/InputNode.d.ts +8 -0
  10. package/dist/types/ast/LiteralNode.d.ts +7 -0
  11. package/dist/types/ast/OptionsNode.d.ts +10 -0
  12. package/dist/types/ast/ParamNode.d.ts +9 -0
  13. package/dist/types/ast/ParamRefNode.d.ts +8 -0
  14. package/dist/types/ast/PlotAttributeNode.d.ts +18 -0
  15. package/dist/types/ast/PlotFromNode.d.ts +9 -0
  16. package/dist/types/ast/PlotInteractorNode.d.ts +8 -0
  17. package/dist/types/ast/PlotLegendNode.d.ts +10 -0
  18. package/dist/types/ast/PlotMarkNode.d.ts +10 -0
  19. package/dist/types/ast/PlotNode.d.ts +11 -0
  20. package/dist/types/ast/SelectionNode.d.ts +12 -0
  21. package/dist/types/ast/SpecNode.d.ts +10 -0
  22. package/dist/types/ast/TransformNode.d.ts +13 -0
  23. package/dist/types/ast/VConcatNode.d.ts +10 -0
  24. package/dist/types/ast/VSpaceNode.d.ts +11 -0
  25. package/dist/types/ast-to-dom.d.ts +38 -0
  26. package/dist/types/ast-to-esm.d.ts +64 -0
  27. package/dist/types/config/components.d.ts +4 -0
  28. package/dist/types/config/extensions.d.ts +9 -0
  29. package/dist/types/config/inputs.d.ts +5 -0
  30. package/dist/types/config/plots.d.ts +34 -0
  31. package/dist/types/config/transforms.d.ts +4 -0
  32. package/dist/types/constants.d.ts +30 -0
  33. package/dist/types/index.d.ts +29 -0
  34. package/dist/types/parse-spec.d.ts +86 -0
  35. package/dist/types/spec/CSSStyles.d.ts +3 -0
  36. package/dist/types/spec/Data.d.ts +165 -0
  37. package/dist/types/spec/Expression.d.ts +27 -0
  38. package/dist/types/spec/HConcat.d.ts +8 -0
  39. package/dist/types/spec/HSpace.d.ts +9 -0
  40. package/dist/types/spec/Input.d.ts +182 -0
  41. package/dist/types/spec/Param.d.ts +51 -0
  42. package/dist/types/spec/Plot.d.ts +14 -0
  43. package/dist/types/spec/PlotAttribute.d.ts +1522 -0
  44. package/dist/types/spec/PlotFrom.d.ts +20 -0
  45. package/dist/types/spec/PlotInteractor.d.ts +8 -0
  46. package/dist/types/spec/PlotLegend.d.ts +68 -0
  47. package/dist/types/spec/PlotMark.d.ts +26 -0
  48. package/dist/types/spec/PlotTypes.d.ts +293 -0
  49. package/dist/types/spec/Spec.d.ts +45 -0
  50. package/dist/types/spec/Transform.d.ts +278 -0
  51. package/dist/types/spec/VConcat.d.ts +8 -0
  52. package/dist/types/spec/VSpace.d.ts +9 -0
  53. package/dist/types/spec/interactors/Highlight.d.ts +37 -0
  54. package/dist/types/spec/interactors/Interval1D.d.ts +63 -0
  55. package/dist/types/spec/interactors/Interval2D.d.ts +46 -0
  56. package/dist/types/spec/interactors/Nearest.d.ts +25 -0
  57. package/dist/types/spec/interactors/PanZoom.d.ts +58 -0
  58. package/dist/types/spec/interactors/Toggle.d.ts +51 -0
  59. package/dist/types/spec/marks/Area.d.ts +139 -0
  60. package/dist/types/spec/marks/Arrow.d.ts +94 -0
  61. package/dist/types/spec/marks/Axis.d.ts +281 -0
  62. package/dist/types/spec/marks/Bar.d.ts +150 -0
  63. package/dist/types/spec/marks/Cell.d.ts +57 -0
  64. package/dist/types/spec/marks/Contour.d.ts +23 -0
  65. package/dist/types/spec/marks/Delaunay.d.ts +86 -0
  66. package/dist/types/spec/marks/DenseLine.d.ts +27 -0
  67. package/dist/types/spec/marks/Density.d.ts +121 -0
  68. package/dist/types/spec/marks/Dot.d.ts +129 -0
  69. package/dist/types/spec/marks/Frame.d.ts +21 -0
  70. package/dist/types/spec/marks/Geo.d.ts +53 -0
  71. package/dist/types/spec/marks/Hexbin.d.ts +30 -0
  72. package/dist/types/spec/marks/Hexgrid.d.ts +25 -0
  73. package/dist/types/spec/marks/Image.d.ts +89 -0
  74. package/dist/types/spec/marks/Line.d.ts +82 -0
  75. package/dist/types/spec/marks/Link.d.ts +60 -0
  76. package/dist/types/spec/marks/Marks.d.ts +890 -0
  77. package/dist/types/spec/marks/Raster.d.ts +124 -0
  78. package/dist/types/spec/marks/Rect.d.ts +166 -0
  79. package/dist/types/spec/marks/Regression.d.ts +58 -0
  80. package/dist/types/spec/marks/Rule.d.ts +100 -0
  81. package/dist/types/spec/marks/Text.d.ts +106 -0
  82. package/dist/types/spec/marks/Tick.d.ts +61 -0
  83. package/dist/types/spec/marks/Vector.d.ts +99 -0
  84. package/dist/types/util.d.ts +12 -0
  85. package/jsconfig.json +10 -0
  86. package/package.json +16 -9
  87. package/src/ast/ASTNode.js +23 -2
  88. package/src/ast/DataNode.js +79 -21
  89. package/src/ast/HSpaceNode.js +1 -1
  90. package/src/ast/InputNode.js +1 -2
  91. package/src/ast/ParamNode.js +1 -2
  92. package/src/ast/PlotAttributeNode.js +1 -2
  93. package/src/ast/PlotInteractorNode.js +1 -2
  94. package/src/ast/PlotLegendNode.js +1 -2
  95. package/src/ast/PlotMarkNode.js +3 -2
  96. package/src/ast/TransformNode.js +1 -2
  97. package/src/ast/VSpaceNode.js +1 -1
  98. package/src/ast-to-dom.js +16 -7
  99. package/src/ast-to-esm.js +41 -12
  100. package/src/config/inputs.js +1 -0
  101. package/src/config/plots.js +4 -0
  102. package/src/index.js +4 -0
  103. package/src/parse-spec.js +38 -5
  104. package/src/spec/CSSStyles.ts +9 -0
  105. package/src/spec/Data.ts +184 -0
  106. package/src/spec/Expression.ts +31 -0
  107. package/src/spec/HConcat.ts +9 -0
  108. package/src/spec/HSpace.ts +9 -0
  109. package/src/spec/Input.ts +182 -0
  110. package/src/spec/Param.ts +68 -0
  111. package/src/spec/Plot.ts +15 -0
  112. package/src/spec/PlotAttribute.ts +1783 -0
  113. package/src/spec/PlotFrom.ts +23 -0
  114. package/src/spec/PlotInteractor.ts +25 -0
  115. package/src/spec/PlotLegend.ts +70 -0
  116. package/src/spec/PlotMark.ts +51 -0
  117. package/src/spec/PlotTypes.ts +519 -0
  118. package/src/spec/Spec.ts +63 -0
  119. package/src/spec/Transform.ts +394 -0
  120. package/src/spec/VConcat.ts +9 -0
  121. package/src/spec/VSpace.ts +9 -0
  122. package/src/spec/interactors/Highlight.ts +38 -0
  123. package/src/spec/interactors/Interval1D.ts +67 -0
  124. package/src/spec/interactors/Interval2D.ts +48 -0
  125. package/src/spec/interactors/Nearest.ts +28 -0
  126. package/src/spec/interactors/PanZoom.ts +65 -0
  127. package/src/spec/interactors/Toggle.ts +56 -0
  128. package/src/spec/marks/Area.ts +154 -0
  129. package/src/spec/marks/Arrow.ts +108 -0
  130. package/src/spec/marks/Axis.ts +305 -0
  131. package/src/spec/marks/Bar.ts +160 -0
  132. package/src/spec/marks/Cell.ts +62 -0
  133. package/src/spec/marks/Contour.ts +25 -0
  134. package/src/spec/marks/Delaunay.ts +95 -0
  135. package/src/spec/marks/DenseLine.ts +30 -0
  136. package/src/spec/marks/Density.ts +145 -0
  137. package/src/spec/marks/Dot.ts +147 -0
  138. package/src/spec/marks/Frame.ts +23 -0
  139. package/src/spec/marks/Geo.ts +58 -0
  140. package/src/spec/marks/Hexbin.ts +34 -0
  141. package/src/spec/marks/Hexgrid.ts +27 -0
  142. package/src/spec/marks/Image.ts +101 -0
  143. package/src/spec/marks/Line.ts +93 -0
  144. package/src/spec/marks/Link.ts +70 -0
  145. package/src/spec/marks/Marks.ts +1062 -0
  146. package/src/spec/marks/Raster.ts +145 -0
  147. package/src/spec/marks/Rect.ts +183 -0
  148. package/src/spec/marks/Regression.ts +63 -0
  149. package/src/spec/marks/Rule.ts +113 -0
  150. package/src/spec/marks/Text.ts +122 -0
  151. package/src/spec/marks/Tick.ts +69 -0
  152. package/src/spec/marks/Vector.ts +113 -0
  153. package/src/util.js +8 -0
  154. package/tsconfig.json +11 -0
@@ -0,0 +1,1783 @@
1
+ import { CSSStyles } from './CSSStyles.js';
2
+ import { ParamRef } from './Param.js';
3
+ import {
4
+ ColorScaleType, ColorScheme, ContinuousScaleType, DiscreteScaleType,
5
+ Fixed, Interpolate, Interval, PositionScaleType, ProjectionName
6
+ } from './PlotTypes.js';
7
+
8
+ export type LabelArrow =
9
+ | 'auto'
10
+ | 'up'
11
+ | 'right'
12
+ | 'down'
13
+ | 'left'
14
+ | 'none'
15
+ | true
16
+ | false
17
+ | null;
18
+
19
+ /** Plot attributes. */
20
+ export interface PlotAttributes {
21
+ /**
22
+ * A unique name for the plot. The name is used by standalone legend
23
+ * components to to lookup the plot and access scale mappings.
24
+ */
25
+ name?: string;
26
+
27
+ /**
28
+ * The outer width of the plot in pixels, including margins. Defaults to 640.
29
+ * On Observable, this can be set to the built-in [width][1] for full-width
30
+ * responsive plots. Note: the default style has a max-width of 100%; the plot
31
+ * will automatically shrink to fit even when a fixed width is specified.
32
+ *
33
+ * [1]: https://github.com/observablehq/stdlib/blob/main/README.md#width
34
+ */
35
+ width?: number | ParamRef;
36
+
37
+ /**
38
+ * The outer height of the plot in pixels, including margins. The default
39
+ * depends on the plot’s scales, and the plot’s width if an aspectRatio is
40
+ * specified. For example, if the *y* scale is linear and there is no *fy*
41
+ * scale, it might be 396.
42
+ */
43
+ height?: number | ParamRef;
44
+
45
+ /**
46
+ * The desired aspect ratio of the *x* and *y* scales, affecting the default
47
+ * height. Given an aspect ratio of *dx* / *dy*, and assuming that the *x* and
48
+ * *y* scales represent equivalent units (say, degrees Celsius or meters),
49
+ * computes a default height such that *dx* pixels along *x* represents the
50
+ * same variation as *dy* pixels along *y*. Note: when faceting, set the *fx*
51
+ * and *fy* scales’ **round** option to false for an exact aspect ratio.
52
+ */
53
+ aspectRatio?: number | boolean | null | ParamRef;
54
+
55
+ /**
56
+ * Shorthand to set the same default for all four margins: **marginTop**,
57
+ * **marginRight**, **marginBottom**, and **marginLeft**. Otherwise, the
58
+ * default margins depend on the maximum margins of the plot’s marks. While
59
+ * most marks default to zero margins (because they are drawn inside the chart
60
+ * area), Plot’s axis marks have non-zero default margins.
61
+ */
62
+ margin?: number | ParamRef;
63
+
64
+ /**
65
+ * The top margin; the distance in pixels between the top edges of the inner
66
+ * and outer plot area. Defaults to the maximum top margin of the plot’s
67
+ * marks.
68
+ */
69
+ marginTop?: number | ParamRef;
70
+
71
+ /**
72
+ * The right margin; the distance in pixels between the right edges of the
73
+ * inner and outer plot area. Defaults to the maximum right margin of the
74
+ * plot’s marks.
75
+ */
76
+ marginRight?: number | ParamRef;
77
+
78
+ /**
79
+ * The bottom margin; the distance in pixels between the bottom edges of the
80
+ * inner and outer plot area. Defaults to the maximum bottom margin of the
81
+ * plot’s marks.
82
+ */
83
+ marginBottom?: number | ParamRef;
84
+
85
+ /**
86
+ * The left margin; the distance in pixels between the left edges of the inner
87
+ * and outer plot area. Defaults to the maximum left margin of the plot’s
88
+ * marks.
89
+ */
90
+ marginLeft?: number | ParamRef;
91
+
92
+ /**
93
+ * A shorthand object notation for setting multiple margin values.
94
+ * The object keys are margin names (top, right, etc).
95
+ */
96
+ margins?: {
97
+ top?: number | ParamRef;
98
+ right?: number | ParamRef;
99
+ bottom?: number | ParamRef;
100
+ left?: number | ParamRef;
101
+ };
102
+
103
+ /**
104
+ * Shorthand to set the same default for all four insets: **insetTop**,
105
+ * **insetRight**, **insetBottom**, and **insetLeft**. All insets typically
106
+ * default to zero, though not always (say when using bin transform). A
107
+ * positive inset reduces effective area, while a negative inset increases it.
108
+ */
109
+ inset?: number | ParamRef;
110
+
111
+ /**
112
+ * Custom styles to override Plot’s defaults. Styles may be specified either
113
+ * as a string of inline styles (*e.g.*, `"color: red;"`, in the same fashion
114
+ * as assigning [*element*.style][1]) or an object of properties (*e.g.*,
115
+ * `{color: "red"}`, in the same fashion as assigning [*element*.style
116
+ * properties][2]). Note that unitless numbers ([quirky lengths][3]) such as
117
+ * `{padding: 20}` may not supported by some browsers; you should instead
118
+ * specify a string with units such as `{padding: "20px"}`. By default, the
119
+ * returned plot has a max-width of 100%, and the system-ui font. Plot’s marks
120
+ * and axes default to [currentColor][4], meaning that they will inherit the
121
+ * surrounding content’s color.
122
+ *
123
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
124
+ * [2]: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration
125
+ * [3]: https://www.w3.org/TR/css-values-4/#deprecated-quirky-length
126
+ * [4]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword
127
+ */
128
+ style?: string | CSSStyles | null | ParamRef;
129
+
130
+ /**
131
+ * How to distribute unused space in the **range** for *point* and *band*
132
+ * scales. A number in [0, 1], such as:
133
+ *
134
+ * - 0 - use the start of the range, putting unused space at the end
135
+ * - 0.5 (default) - use the middle, distributing unused space evenly
136
+ * - 1 use the end, putting unused space at the start
137
+ *
138
+ * For ordinal position scales only.
139
+ */
140
+ align?: number | ParamRef;
141
+
142
+ /**
143
+ * For *band* scales, how much of the **range** to reserve to separate
144
+ * adjacent bands; defaults to 0.1 (10%). For *point* scales, the amount of
145
+ * inset for the first and last value as a proportion of the bandwidth;
146
+ * defaults to 0.5 (50%).
147
+ *
148
+ * For ordinal position scales only.
149
+ */
150
+ padding?: number | ParamRef;
151
+
152
+ /**
153
+ * The side of the frame on which to place the implicit axis: *top* or
154
+ * *bottom* for *x* or *fx*, or *left* or *right* for *y* or *fy*. The default
155
+ * depends on the scale:
156
+ *
157
+ * - *x* - *bottom*
158
+ * - *y* - *left*
159
+ * - *fx* - *top* if there is a *bottom* *x* axis, and otherwise *bottom*
160
+ * - *fy* - *right* if there is a *left* *y* axis, and otherwise *right*
161
+ *
162
+ * If *both*, an implicit axis will be rendered on both sides of the plot
163
+ * (*top* and *bottom* for *x* or *fx*, or *left* and *right* for *y* or
164
+ * *fy*). If null, the implicit axis is suppressed.
165
+ *
166
+ * For position axes only.
167
+ */
168
+ axis?: 'top' | 'right' | 'bottom' | 'left' | 'both' | boolean | null | ParamRef;
169
+
170
+ /**
171
+ * Whether to show a grid aligned with the scale’s ticks. If true, show a grid
172
+ * with the currentColor stroke; if a string, show a grid with the specified
173
+ * stroke color; if an approximate number of ticks, an interval, or an array
174
+ * of tick values, show corresponding grid lines. See also the grid mark.
175
+ *
176
+ * For axes only.
177
+ */
178
+ grid?: boolean | string | ParamRef;
179
+
180
+ /**
181
+ * A textual label to show on the axis or legend; if null, show no label. By
182
+ * default the scale label is inferred from channel definitions, possibly with
183
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
184
+ *
185
+ * For axes and legends only.
186
+ */
187
+ label?: string | null | ParamRef;
188
+
189
+
190
+ // x scale attributes
191
+
192
+ /**
193
+ * The *x* scale type, affecting how the scale encodes abstract data, say by
194
+ * applying a mathematical transformation. If null, the scale is disabled.
195
+ *
196
+ * For quantitative data (numbers), defaults to *linear*; for temporal data
197
+ * (dates), defaults to *utc*; for ordinal data (strings or booleans),
198
+ * defaults to *point* for position scales, *categorical* for color scales,
199
+ * and otherwise *ordinal*. However, the radius scale defaults to *sqrt*, and
200
+ * the length and opacity scales default to *linear*; these scales are
201
+ * intended for quantitative data. The plot’s marks may also impose a scale
202
+ * type; for example, the barY mark requires that *x* is a *band* scale.
203
+ */
204
+ xScale?: PositionScaleType | null | ParamRef;
205
+
206
+ /**
207
+ * The extent of the scale’s inputs (abstract values). By default inferred
208
+ * from channel values. For continuous data (numbers and dates), it is
209
+ * typically [*min*, *max*]; it can be [*max*, *min*] to reverse the scale.
210
+ * For ordinal data (strings or booleans), it is an array (or iterable) of
211
+ * values is the desired order, defaulting to natural ascending order.
212
+ *
213
+ * Linear scales have a default domain of [0, 1]. Log scales have a default
214
+ * domain of [1, 10] and cannot include zero. Radius scales have a default
215
+ * domain from 0 to the median first quartile of associated channels. Length
216
+ * have a default domain from 0 to the median median of associated channels.
217
+ * Opacity scales have a default domain from 0 to the maximum value of
218
+ * associated channels.
219
+ */
220
+ xDomain?: any[] | Fixed | ParamRef;
221
+
222
+ /**
223
+ * The extent of the scale’s outputs (visual values). By default inferred from
224
+ * the scale’s **type** and **domain**, and for position scales, the plot’s
225
+ * dimensions. For continuous data (numbers and dates), and for ordinal
226
+ * position scales (*point* and *band*), it is typically [*min*, *max*]; it
227
+ * can be [*max*, *min*] to reverse the scale.
228
+ */
229
+ xRange?: any[] | Fixed | ParamRef;
230
+
231
+ /**
232
+ * If true, or a tick count or interval, extend the domain to nice round
233
+ * values. Defaults to 1, 2 or 5 times a power of 10 for *linear* scales, and
234
+ * nice time intervals for *utc* and *time* scales. Pass an interval such as
235
+ * *minute*, *wednesday* or *month* to specify what constitutes a nice
236
+ * interval.
237
+ *
238
+ * For continuous scales only.
239
+ */
240
+ xNice?: boolean | number | Interval | ParamRef;
241
+
242
+ /**
243
+ * Shorthand to set the same default for all four insets: **insetTop**,
244
+ * **insetRight**, **insetBottom**, and **insetLeft**. All insets typically
245
+ * default to zero, though not always (say when using bin transform). A
246
+ * positive inset reduces effective area, while a negative inset increases it.
247
+ */
248
+ xInset?: number | ParamRef;
249
+
250
+ /**
251
+ * Insets the right edge by the specified number of pixels. A positive value
252
+ * insets towards the left edge (reducing effective area), while a negative
253
+ * value insets away from the left edge (increasing it).
254
+ */
255
+ xInsetRight?: number | ParamRef;
256
+
257
+ /**
258
+ * Insets the left edge by the specified number of pixels. A positive value
259
+ * insets towards the right edge (reducing effective area), while a negative
260
+ * value insets away from the right edge (increasing it).
261
+ */
262
+ xInsetLeft?: number | ParamRef;
263
+
264
+ /**
265
+ * If true, values below the domain minimum are treated as the domain minimum,
266
+ * and values above the domain maximum are treated as the domain maximum.
267
+ *
268
+ * Clamping is useful for focusing on a subset of the data while ensuring that
269
+ * extreme values remain visible, but use caution: clamped values may need an
270
+ * annotation to avoid misinterpretation. Clamping typically requires setting
271
+ * an explicit **domain** since if the domain is inferred, no values will be
272
+ * outside the domain.
273
+ *
274
+ * For continuous scales only.
275
+ */
276
+ xClamp?: boolean | ParamRef;
277
+
278
+ /**
279
+ * If true, round the output value to the nearest integer (pixel); useful for
280
+ * crisp edges when rendering.
281
+ *
282
+ * For position scales only.
283
+ */
284
+ xRound?: boolean | ParamRef;
285
+
286
+ /**
287
+ * How to distribute unused space in the **range** for *point* and *band*
288
+ * scales. A number in [0, 1], such as:
289
+ *
290
+ * - 0 - use the start of the range, putting unused space at the end
291
+ * - 0.5 (default) - use the middle, distributing unused space evenly
292
+ * - 1 use the end, putting unused space at the start
293
+ *
294
+ * For ordinal position scales only.
295
+ */
296
+ xAlign?: number | ParamRef;
297
+
298
+ /**
299
+ * For *band* scales, how much of the **range** to reserve to separate
300
+ * adjacent bands; defaults to 0.1 (10%). For *point* scales, the amount of
301
+ * inset for the first and last value as a proportion of the bandwidth;
302
+ * defaults to 0.5 (50%).
303
+ *
304
+ * For ordinal position scales only.
305
+ */
306
+ xPadding?: number | ParamRef;
307
+
308
+ /**
309
+ * For a *band* scale, how much of the range to reserve to separate
310
+ * adjacent bands.
311
+ */
312
+ xPaddingInner?: number | ParamRef;
313
+
314
+ /**
315
+ * For a *band* scale, how much of the range to reserve to inset first and
316
+ * last bands.
317
+ */
318
+ xPaddingOuter?: number | ParamRef;
319
+
320
+ /**
321
+ * The side of the frame on which to place the implicit axis: *top* or
322
+ * *bottom* for *x*. Defaults to *bottom* for an *x* scale.
323
+ *
324
+ * If *both*, an implicit axis will be rendered on both sides of the plot
325
+ * (*top* and *bottom* for *x*). If null, the implicit axis is suppressed.
326
+ */
327
+ xAxis?: 'top' | 'bottom' | 'both' | boolean | null | ParamRef;
328
+
329
+ /**
330
+ * The desired approximate number of axis ticks, or an explicit array of tick
331
+ * values, or an interval such as *day* or *month*.
332
+ */
333
+ xTicks?: number | Interval | any[] | ParamRef;
334
+
335
+ /**
336
+ * The length of axis tick marks in pixels; negative values extend in the
337
+ * opposite direction. Defaults to 6 for *x* and *y* axes and *color* and
338
+ * *opacity* *ramp* legends, and 0 for *fx* and *fy* axes.
339
+ */
340
+ xTickSize?: number | ParamRef;
341
+
342
+ /**
343
+ * The desired approximate spacing between adjacent axis ticks, affecting the
344
+ * default **ticks**; defaults to 80 pixels for *x* and *fx*, and 35 pixels
345
+ * for *y* and *fy*.
346
+ */
347
+ xTickSpacing?: number | ParamRef;
348
+
349
+ /**
350
+ * The distance between an axis tick mark and its associated text label (in
351
+ * pixels); often defaults to 3, but may be affected by **xTickSize** and
352
+ * **xTickRotate**.
353
+ */
354
+ xTickPadding?: number | ParamRef;
355
+
356
+ /**
357
+ * How to format inputs (abstract values) for axis tick labels; one of:
358
+ *
359
+ * - a [d3-format][1] string for numeric scales
360
+ * - a [d3-time-format][2] string for temporal scales
361
+ *
362
+ * [1]: https://d3js.org/d3-time
363
+ * [2]: https://d3js.org/d3-time-format
364
+ */
365
+ xTickFormat?: string | null | ParamRef;
366
+
367
+ /**
368
+ * The rotation angle of axis tick labels in degrees clocksize; defaults to 0.
369
+ */
370
+ xTickRotate?: number | ParamRef;
371
+
372
+ /**
373
+ * Whether to show a grid aligned with the scale’s ticks. If true, show a grid
374
+ * with the currentColor stroke; if a string, show a grid with the specified
375
+ * stroke color; if an approximate number of ticks, an interval, or an array
376
+ * of tick values, show corresponding grid lines. See also the grid mark.
377
+ *
378
+ * For axes only.
379
+ */
380
+ xGrid?: boolean | string | Interval | any[] | ParamRef;
381
+
382
+ /**
383
+ * If true, draw a line along the axis; if false (default), do not.
384
+ */
385
+ xLine?: boolean | ParamRef;
386
+
387
+ /**
388
+ * A textual label to show on the axis or legend; if null, show no label. By
389
+ * default the scale label is inferred from channel definitions, possibly with
390
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
391
+ *
392
+ * For axes and legends only.
393
+ */
394
+ xLabel?: string | null | ParamRef;
395
+
396
+ /**
397
+ * Where to place the axis **label** relative to the plot’s frame. For
398
+ * vertical position scales (*y* and *fy*), may be *top*, *bottom*, or
399
+ * *center*; for horizontal position scales (*x* and *fx*), may be *left*,
400
+ * *right*, or *center*. Defaults to *center* for ordinal scales (including
401
+ * *fx* and *fy*), and otherwise *top* for *y*, and *right* for *x*.
402
+ */
403
+ xLabelAnchor?: 'top' | 'right' | 'bottom' | 'left' | 'center' | ParamRef;
404
+
405
+ /**
406
+ * Whether to apply a directional arrow such as → or ↑ to the x-axis scale
407
+ * label. If *auto* (the default), the presence of the arrow depends on
408
+ * whether the scale is ordinal.
409
+ */
410
+ xLabelArrow?: LabelArrow | ParamRef;
411
+
412
+ /**
413
+ * The axis **label** position offset (in pixels); default depends on margins
414
+ * and orientation.
415
+ */
416
+ xLabelOffset?: number | ParamRef;
417
+
418
+ /**
419
+ * The font-variant attribute for axis ticks; defaults to *tabular-nums* for
420
+ * quantitative axes.
421
+ */
422
+ xFontVariant?: string | ParamRef;
423
+
424
+ /**
425
+ * A short label representing the axis in the accessibility tree.
426
+ */
427
+ xAriaLabel?: string | ParamRef;
428
+
429
+ /**
430
+ * A textual description for the axis in the accessibility tree.
431
+ */
432
+ xAriaDescription?: string | ParamRef;
433
+
434
+ /**
435
+ * If true, shorthand for a transform suitable for percentages, mapping
436
+ * proportions in [0, 1] to [0, 100].
437
+ */
438
+ xPercent?: boolean | ParamRef;
439
+
440
+ /**
441
+ * Whether to reverse the scale’s encoding; equivalent to reversing either the
442
+ * **domain** or **range**.
443
+ */
444
+ xReverse?: boolean | ParamRef;
445
+
446
+ /**
447
+ * Whether the **domain** must include zero. If the domain minimum is
448
+ * positive, it will be set to zero; otherwise if the domain maximum is
449
+ * negative, it will be set to zero.
450
+ *
451
+ * For quantitative scales only.
452
+ */
453
+ xZero?: boolean | ParamRef;
454
+
455
+ /**
456
+ * A power scale’s exponent (*e.g.*, 0.5 for sqrt); defaults to 1 for a
457
+ * linear scale. For *pow* scales only.
458
+ */
459
+ xExponent?: number | ParamRef;
460
+
461
+ /**
462
+ * A log scale’s base; defaults to 10. Does not affect the scale’s encoding,
463
+ * but rather the default ticks. For *log* scales only.
464
+ */
465
+ xBase?: number | ParamRef;
466
+
467
+ /**
468
+ * A symlog scale’s constant, expressing the magnitude of the linear region
469
+ * around the origin; defaults to 1. For *symlog* scales only.
470
+ */
471
+ xConstant?: number | ParamRef;
472
+
473
+
474
+ // y scale attributes
475
+
476
+ /**
477
+ * The *y* scale type, affecting how the scale encodes abstract data, say by
478
+ * applying a mathematical transformation. If null, the scale is disabled.
479
+ *
480
+ * For quantitative data (numbers), defaults to *linear*; for temporal data
481
+ * (dates), defaults to *utc*; for ordinal data (strings or booleans),
482
+ * defaults to *point* for position scales, The plot’s marks may also impose
483
+ * a scale type; for example, the barY mark requires that *x* is a *band*
484
+ * scale.
485
+ */
486
+ yScale?: PositionScaleType | null | ParamRef;
487
+
488
+ /**
489
+ * The extent of the scale’s inputs (abstract values). By default inferred
490
+ * from channel values. For continuous data (numbers and dates), it is
491
+ * typically [*min*, *max*]; it can be [*max*, *min*] to reverse the scale.
492
+ * For ordinal data (strings or booleans), it is an array (or iterable) of
493
+ * values is the desired order, defaulting to natural ascending order.
494
+ *
495
+ * Linear scales have a default domain of [0, 1]. Log scales have a default
496
+ * domain of [1, 10] and cannot include zero.
497
+ */
498
+ yDomain?: any[] | Fixed | ParamRef;
499
+
500
+ /**
501
+ * The extent of the scale’s outputs (visual values). By default inferred
502
+ * from the scale’s **type** and **domain**, and for position scales, the
503
+ * plot’s dimensions. For continuous data (numbers and dates), and for
504
+ * ordinal position scales (*point* and *band*), it is typically [*min*,
505
+ * *max*]; it can be [*max*, *min*] to reverse the scale.
506
+ */
507
+ yRange?: any[] | Fixed | ParamRef;
508
+
509
+ /**
510
+ * If true, or a tick count or interval, extend the domain to nice round
511
+ * values. Defaults to 1, 2 or 5 times a power of 10 for *linear* scales, and
512
+ * nice time intervals for *utc* and *time* scales. Pass an interval such as
513
+ * *minute*, *wednesday* or *month* to specify what constitutes a nice
514
+ * interval.
515
+ *
516
+ * For continuous scales only.
517
+ */
518
+ yNice?: boolean | number | Interval | ParamRef;
519
+
520
+ /**
521
+ * Shorthand to set the same default for all four insets: **insetTop**,
522
+ * **insetRight**, **insetBottom**, and **insetLeft**. All insets typically
523
+ * default to zero, though not always (say when using bin transform). A
524
+ * positive inset reduces effective area, while a negative inset increases it.
525
+ */
526
+ yInset?: number | ParamRef;
527
+
528
+ /**
529
+ * Insets the top edge by the specified number of pixels. A positive value
530
+ * insets towards the bottom edge (reducing effective area), while a negative
531
+ * value insets away from the bottom edge (increasing it).
532
+ */
533
+ yInsetTop?: number | ParamRef;
534
+
535
+ /**
536
+ * Insets the bottom edge by the specified number of pixels. A positive value
537
+ * insets towards the top edge (reducing effective area), while a negative
538
+ * value insets away from the top edge (increasing it).
539
+ */
540
+ yInsetBottom?: number | ParamRef;
541
+
542
+ /**
543
+ * If true, values below the domain minimum are treated as the domain minimum,
544
+ * and values above the domain maximum are treated as the domain maximum.
545
+ *
546
+ * Clamping is useful for focusing on a subset of the data while ensuring that
547
+ * extreme values remain visible, but use caution: clamped values may need an
548
+ * annotation to avoid misinterpretation. Clamping typically requires setting
549
+ * an explicit **domain** since if the domain is inferred, no values will be
550
+ * outside the domain.
551
+ *
552
+ * For continuous scales only.
553
+ */
554
+ yClamp?: boolean | ParamRef;
555
+
556
+ /**
557
+ * If true, round the output value to the nearest integer (pixel); useful for
558
+ * crisp edges when rendering.
559
+ *
560
+ * For position scales only.
561
+ */
562
+ yRound?: boolean | ParamRef;
563
+
564
+ /**
565
+ * How to distribute unused space in the **range** for *point* and *band*
566
+ * scales. A number in [0, 1], such as:
567
+ *
568
+ * - 0 - use the start of the range, putting unused space at the end
569
+ * - 0.5 (default) - use the middle, distributing unused space evenly
570
+ * - 1 use the end, putting unused space at the start
571
+ *
572
+ * For ordinal position scales only.
573
+ */
574
+ yAlign?: number | ParamRef;
575
+
576
+ /**
577
+ * For *band* scales, how much of the **range** to reserve to separate
578
+ * adjacent bands; defaults to 0.1 (10%). For *point* scales, the amount of
579
+ * inset for the first and last value as a proportion of the bandwidth;
580
+ * defaults to 0.5 (50%).
581
+ *
582
+ * For ordinal position scales only.
583
+ */
584
+ yPadding?: number | ParamRef;
585
+
586
+ /**
587
+ * For a *band* scale, how much of the range to reserve to separate
588
+ * adjacent bands.
589
+ */
590
+ yPaddingInner?: number | ParamRef;
591
+
592
+ /**
593
+ * For a *band* scale, how much of the range to reserve to inset first and
594
+ * last bands.
595
+ */
596
+ yPaddingOuter?: number | ParamRef;
597
+
598
+ /**
599
+ * The side of the frame on which to place the implicit axis: *left* or
600
+ * *right* for *y*. Defaults to *left* for a *y* scale.
601
+ *
602
+ * If *both*, an implicit axis will be rendered on both sides of the plot
603
+ * (*left* and *right* for *y*). If null, the implicit axis is suppressed.
604
+ */
605
+ yAxis?: 'left' | 'right' | 'both' | boolean | null | ParamRef;
606
+
607
+ /**
608
+ * The desired approximate number of axis ticks, or an explicit array of tick
609
+ * values, or an interval such as *day* or *month*.
610
+ */
611
+ yTicks?: number | Interval | any[] | ParamRef;
612
+
613
+ /**
614
+ * The length of axis tick marks in pixels; negative values extend in the
615
+ * opposite direction. Defaults to 6 for *x* and *y* axes and *color* and
616
+ * *opacity* *ramp* legends, and 0 for *fx* and *fy* axes.
617
+ */
618
+ yTickSize?: number | ParamRef;
619
+
620
+ /**
621
+ * The desired approximate spacing between adjacent axis ticks, affecting the
622
+ * default **ticks**; defaults to 80 pixels for *x* and *fx*, and 35 pixels
623
+ * for *y* and *fy*.
624
+ */
625
+ yTickSpacing?: number | ParamRef;
626
+
627
+ /**
628
+ * The distance between an axis tick mark and its associated text label (in
629
+ * pixels); often defaults to 3, but may be affected by **yTickSize** and
630
+ * **yTickRotate**.
631
+ */
632
+ yTickPadding?: number | ParamRef;
633
+
634
+ /**
635
+ * How to format inputs (abstract values) for axis tick labels; one of:
636
+ *
637
+ * - a [d3-format][1] string for numeric scales
638
+ * - a [d3-time-format][2] string for temporal scales
639
+ *
640
+ * [1]: https://d3js.org/d3-time
641
+ * [2]: https://d3js.org/d3-time-format
642
+ */
643
+ yTickFormat?: string | null | ParamRef;
644
+
645
+ /**
646
+ * The rotation angle of axis tick labels in degrees clocksize; defaults to 0.
647
+ */
648
+ yTickRotate?: number | ParamRef;
649
+
650
+ /**
651
+ * Whether to show a grid aligned with the scale’s ticks. If true, show a grid
652
+ * with the currentColor stroke; if a string, show a grid with the specified
653
+ * stroke color; if an approximate number of ticks, an interval, or an array
654
+ * of tick values, show corresponding grid lines. See also the grid mark.
655
+ *
656
+ * For axes only.
657
+ */
658
+ yGrid?: boolean | string | Interval | any[] | ParamRef;
659
+
660
+ /**
661
+ * If true, draw a line along the axis; if false (default), do not.
662
+ */
663
+ yLine?: boolean | ParamRef;
664
+
665
+ /**
666
+ * A textual label to show on the axis or legend; if null, show no label. By
667
+ * default the scale label is inferred from channel definitions, possibly with
668
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
669
+ *
670
+ * For axes and legends only.
671
+ */
672
+ yLabel?: string | null | ParamRef;
673
+
674
+ /**
675
+ * Where to place the axis **label** relative to the plot’s frame. For
676
+ * vertical position scales (*y* and *fy*), may be *top*, *bottom*, or
677
+ * *center*; for horizontal position scales (*x* and *fx*), may be *left*,
678
+ * *right*, or *center*. Defaults to *center* for ordinal scales (including
679
+ * *fx* and *fy*), and otherwise *top* for *y*, and *right* for *x*.
680
+ */
681
+ yLabelAnchor?: 'top' | 'right' | 'bottom' | 'left' | 'center' | ParamRef;
682
+
683
+ /**
684
+ * Whether to apply a directional arrow such as → or ↑ to the x-axis scale
685
+ * label. If *auto* (the default), the presence of the arrow depends on
686
+ * whether the scale is ordinal.
687
+ */
688
+ yLabelArrow?: LabelArrow | ParamRef;
689
+
690
+ /**
691
+ * The axis **label** position offset (in pixels); default depends on margins
692
+ * and orientation.
693
+ */
694
+ yLabelOffset?: number | ParamRef;
695
+
696
+ /**
697
+ * The font-variant attribute for axis ticks; defaults to *tabular-nums* for
698
+ * quantitative axes.
699
+ */
700
+ yFontVariant?: string | ParamRef;
701
+
702
+ /**
703
+ * A short label representing the axis in the accessibility tree.
704
+ */
705
+ yAriaLabel?: string | ParamRef;
706
+
707
+ /**
708
+ * A textual description for the axis in the accessibility tree.
709
+ */
710
+ yAriaDescription?: string | ParamRef;
711
+
712
+ /**
713
+ * If true, shorthand for a transform suitable for percentages, mapping
714
+ * proportions in [0, 1] to [0, 100].
715
+ */
716
+ yPercent?: boolean | ParamRef;
717
+
718
+ /**
719
+ * Whether to reverse the scale’s encoding; equivalent to reversing either the
720
+ * **domain** or **range**. Note that by default, when the *y* scale is
721
+ * continuous, the *max* value points to the top of the screen, whereas
722
+ * ordinal values are ranked from top to bottom.
723
+ */
724
+ yReverse?: boolean | ParamRef;
725
+
726
+ /**
727
+ * Whether the **domain** must include zero. If the domain minimum is
728
+ * positive, it will be set to zero; otherwise if the domain maximum is
729
+ * negative, it will be set to zero.
730
+ *
731
+ * For quantitative scales only.
732
+ */
733
+ yZero?: boolean | ParamRef;
734
+
735
+ /**
736
+ * A power scale’s exponent (*e.g.*, 0.5 for sqrt); defaults to 1 for a
737
+ * linear scale. For *pow* scales only.
738
+ */
739
+ yExponent?: number | ParamRef;
740
+
741
+ /**
742
+ * A log scale’s base; defaults to 10. Does not affect the scale’s encoding,
743
+ * but rather the default ticks. For *log* scales only.
744
+ */
745
+ yBase?: number | ParamRef;
746
+
747
+ /**
748
+ * A symlog scale’s constant, expressing the magnitude of the linear region
749
+ * around the origin; defaults to 1. For *symlog* scales only.
750
+ */
751
+ yConstant?: number | ParamRef;
752
+
753
+
754
+ /**
755
+ * Set the *x* and *y* scale domains.
756
+ */
757
+ xyDomain?: any[] | Fixed | ParamRef;
758
+
759
+
760
+ // facet attributes
761
+
762
+ /**
763
+ * Shorthand to set the same default for all four facet margins: marginTop,
764
+ * marginRight, marginBottom, and marginLeft.
765
+ */
766
+ facetMargin?: number | ParamRef;
767
+
768
+ /**
769
+ * The top facet margin; the (minimum) distance in pixels between the top
770
+ * edges of the inner and outer plot area.
771
+ */
772
+ facetMarginTop?: number | ParamRef;
773
+
774
+ /**
775
+ * The right facet margin; the (minimum) distance in pixels between the right
776
+ * edges of the inner and outer plot area.
777
+ */
778
+ facetMarginBottom?: number | ParamRef;
779
+
780
+ /**
781
+ * The bottom facet margin; the (minimum) distance in pixels between the
782
+ * bottom edges of the inner and outer plot area.
783
+ */
784
+ facetMarginLeft?: number | ParamRef;
785
+
786
+ /**
787
+ * The left facet margin; the (minimum) distance in pixels between the left
788
+ * edges of the inner and outer plot area.
789
+ */
790
+ facetMarginRight?: number | ParamRef;
791
+
792
+ /**
793
+ * Default axis grid for fx and fy scales; typically set to true to enable.
794
+ */
795
+ facetGrid?: boolean | string | Interval | any[] | ParamRef;
796
+
797
+ /**
798
+ * Default axis label for fx and fy scales; typically set to null to disable.
799
+ */
800
+ facetLabel?: string | null | ParamRef;
801
+
802
+
803
+ // fx scale attributes
804
+
805
+ /**
806
+ * The extent of the scale’s inputs (abstract values). By default inferred
807
+ * from channel values. For ordinal data (strings or booleans), it is an
808
+ * array (or iterable) of values is the desired order, defaulting to natural
809
+ * ascending order.
810
+ */
811
+ fxDomain?: any[] | Fixed | ParamRef;
812
+
813
+ /**
814
+ * The extent of the scale’s outputs (visual values). By default inferred from
815
+ * the scale’s **type** and **domain**, and the plot’s dimensions. For ordinal
816
+ * position scales (*point* and *band*), it is typically [*min*, *max*]; it
817
+ * can be [*max*, *min*] to reverse the scale.
818
+ */
819
+ fxRange?: any[] | Fixed | ParamRef;
820
+
821
+ /**
822
+ * Shorthand to set the same default for all four insets: **insetTop**,
823
+ * **insetRight**, **insetBottom**, and **insetLeft**. All insets typically
824
+ * default to zero, though not always (say when using bin transform). A
825
+ * positive inset reduces effective area, while a negative inset increases it.
826
+ */
827
+ fxInset?: number | ParamRef;
828
+
829
+ /**
830
+ * Insets the right edge by the specified number of pixels. A positive value
831
+ * insets towards the left edge (reducing effective area), while a negative
832
+ * value insets away from the left edge (increasing it).
833
+ */
834
+ fxInsetRight?: number | ParamRef;
835
+
836
+ /**
837
+ * Insets the left edge by the specified number of pixels. A positive value
838
+ * insets towards the right edge (reducing effective area), while a negative
839
+ * value insets away from the right edge (increasing it).
840
+ */
841
+ fxInsetLeft?: number | ParamRef;
842
+
843
+ /**
844
+ * If true, round the output value to the nearest integer (pixel); useful for
845
+ * crisp edges when rendering.
846
+ *
847
+ * For position scales only.
848
+ */
849
+ fxRound?: boolean | ParamRef;
850
+
851
+ /**
852
+ * How to distribute unused space in the **range** for *point* and *band*
853
+ * scales. A number in [0, 1], such as:
854
+ *
855
+ * - 0 - use the start of the range, putting unused space at the end
856
+ * - 0.5 (default) - use the middle, distributing unused space evenly
857
+ * - 1 use the end, putting unused space at the start
858
+ *
859
+ * For ordinal position scales only.
860
+ */
861
+ fxAlign?: number | ParamRef;
862
+
863
+ /**
864
+ * For *band* scales, how much of the **range** to reserve to separate
865
+ * adjacent bands; defaults to 0.1 (10%). For *point* scales, the amount of
866
+ * inset for the first and last value as a proportion of the bandwidth;
867
+ * defaults to 0.5 (50%).
868
+ *
869
+ * For ordinal position scales only.
870
+ */
871
+ fxPadding?: number | ParamRef;
872
+
873
+ /**
874
+ * For a *band* scale, how much of the range to reserve to separate
875
+ * adjacent bands.
876
+ */
877
+ fxPaddingInner?: number | ParamRef;
878
+
879
+ /**
880
+ * For a *band* scale, how much of the range to reserve to inset first and
881
+ * last bands.
882
+ */
883
+ fxPaddingOuter?: number | ParamRef;
884
+
885
+ /**
886
+ * The side of the frame on which to place the implicit axis: *top* or
887
+ * *bottom* for *fx*. Defaults to *top* if there is a *bottom* *x* axis,
888
+ * and otherwise *bottom*.
889
+ *
890
+ * If *both*, an implicit axis will be rendered on both sides of the plot
891
+ * (*top* and *bottom* for *fx*). If null, the implicit axis is suppressed.
892
+ */
893
+ fxAxis?: 'top' | 'bottom' | 'both' | boolean | null | ParamRef;
894
+
895
+ /**
896
+ * The desired approximate number of axis ticks, or an explicit array of tick
897
+ * values, or an interval such as *day* or *month*.
898
+ */
899
+ fxTicks?: number | Interval | any[] | ParamRef;
900
+
901
+ /**
902
+ * The length of axis tick marks in pixels; negative values extend in the
903
+ * opposite direction. Defaults to 6 for *x* and *y* axes and *color* and
904
+ * *opacity* *ramp* legends, and 0 for *fx* and *fy* axes.
905
+ */
906
+ fxTickSize?: number | ParamRef;
907
+
908
+ /**
909
+ * The desired approximate spacing between adjacent axis ticks, affecting the
910
+ * default **ticks**; defaults to 80 pixels for *x* and *fx*, and 35 pixels
911
+ * for *y* and *fy*.
912
+ */
913
+ fxTickSpacing?: number | ParamRef;
914
+
915
+ /**
916
+ * The distance between an axis tick mark and its associated text label (in
917
+ * pixels); often defaults to 3, but may be affected by **fxTickSize** and
918
+ * **fxTickRotate**.
919
+ */
920
+ fxTickPadding?: number | ParamRef;
921
+
922
+ /**
923
+ * How to format inputs (abstract values) for axis tick labels; one of:
924
+ *
925
+ * - a [d3-format][1] string for numeric scales
926
+ * - a [d3-time-format][2] string for temporal scales
927
+ *
928
+ * [1]: https://d3js.org/d3-time
929
+ * [2]: https://d3js.org/d3-time-format
930
+ */
931
+ fxTickFormat?: string | null | ParamRef;
932
+
933
+ /**
934
+ * The rotation angle of axis tick labels in degrees clocksize; defaults to 0.
935
+ */
936
+ fxTickRotate?: number | ParamRef;
937
+
938
+ /**
939
+ * Whether to show a grid aligned with the scale’s ticks. If true, show a grid
940
+ * with the currentColor stroke; if a string, show a grid with the specified
941
+ * stroke color; if an approximate number of ticks, an interval, or an array
942
+ * of tick values, show corresponding grid lines. See also the grid mark.
943
+ *
944
+ * For axes only.
945
+ */
946
+ fxGrid?: boolean | string | Interval | any[] | ParamRef;
947
+
948
+ /**
949
+ * If true, draw a line along the axis; if false (default), do not.
950
+ */
951
+ fxLine?: boolean | ParamRef;
952
+
953
+ /**
954
+ * A textual label to show on the axis or legend; if null, show no label. By
955
+ * default the scale label is inferred from channel definitions, possibly with
956
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
957
+ *
958
+ * For axes and legends only.
959
+ */
960
+ fxLabel?: string | null | ParamRef;
961
+
962
+ /**
963
+ * Where to place the axis **label** relative to the plot’s frame. For
964
+ * vertical position scales (*y* and *fy*), may be *top*, *bottom*, or
965
+ * *center*; for horizontal position scales (*x* and *fx*), may be *left*,
966
+ * *right*, or *center*. Defaults to *center* for ordinal scales (including
967
+ * *fx* and *fy*), and otherwise *top* for *y*, and *right* for *x*.
968
+ */
969
+ fxLabelAnchor?: 'top' | 'right' | 'bottom' | 'left' | 'center' | ParamRef;
970
+
971
+ /**
972
+ * The axis **label** position offset (in pixels); default depends on margins
973
+ * and orientation.
974
+ */
975
+ fxLabelOffset?: number | ParamRef;
976
+
977
+ /**
978
+ * The font-variant attribute for axis ticks; defaults to *tabular-nums* for
979
+ * quantitative axes.
980
+ */
981
+ fxFontVariant?: string | ParamRef;
982
+
983
+ /**
984
+ * A short label representing the axis in the accessibility tree.
985
+ */
986
+ fxAriaLabel?: string | ParamRef;
987
+
988
+ /**
989
+ * A textual description for the axis in the accessibility tree.
990
+ */
991
+ fxAriaDescription?: string | ParamRef;
992
+
993
+ /**
994
+ * Whether to reverse the scale’s encoding; equivalent to reversing either the
995
+ * **domain** or **range**.
996
+ */
997
+ fxReverse?: boolean | ParamRef;
998
+
999
+
1000
+ // fy scale attributes
1001
+
1002
+ /**
1003
+ * The extent of the scale’s inputs (abstract values). By default inferred
1004
+ * from channel values. For ordinal data (strings or booleans), it is an
1005
+ * array (or iterable) of values is the desired order, defaulting to natural
1006
+ * ascending order.
1007
+ */
1008
+ fyDomain?: any[] | Fixed | ParamRef;
1009
+
1010
+ /**
1011
+ * The extent of the scale’s outputs (visual values). By default inferred from
1012
+ * the scale’s **type** and **domain**, and the plot’s dimensions. For ordinal
1013
+ * position scales (*point* and *band*), it is typically [*min*, *max*]; it
1014
+ * can be [*max*, *min*] to reverse the scale.
1015
+ */
1016
+ fyRange?: any[] | Fixed | ParamRef;
1017
+
1018
+ /**
1019
+ * Shorthand to set the same default for all four insets: **insetTop**,
1020
+ * **insetRight**, **insetBottom**, and **insetLeft**. All insets typically
1021
+ * default to zero, though not always (say when using bin transform). A
1022
+ * positive inset reduces effective area, while a negative inset increases it.
1023
+ */
1024
+ fyInset?: number | ParamRef;
1025
+
1026
+ /**
1027
+ * Insets the top edge by the specified number of pixels. A positive value
1028
+ * insets towards the bottom edge (reducing effective area), while a negative
1029
+ * value insets away from the bottom edge (increasing it).
1030
+ */
1031
+ fyInsetTop?: number | ParamRef;
1032
+
1033
+ /**
1034
+ * Insets the bottom edge by the specified number of pixels. A positive value
1035
+ * insets towards the top edge (reducing effective area), while a negative
1036
+ * value insets away from the top edge (increasing it).
1037
+ */
1038
+ fyInsetBottom?: number | ParamRef;
1039
+
1040
+ /**
1041
+ * If true, round the output value to the nearest integer (pixel); useful for
1042
+ * crisp edges when rendering.
1043
+ *
1044
+ * For position scales only.
1045
+ */
1046
+ fyRound?: boolean | ParamRef;
1047
+
1048
+ /**
1049
+ * How to distribute unused space in the **range** for *point* and *band*
1050
+ * scales. A number in [0, 1], such as:
1051
+ *
1052
+ * - 0 - use the start of the range, putting unused space at the end
1053
+ * - 0.5 (default) - use the middle, distributing unused space evenly
1054
+ * - 1 use the end, putting unused space at the start
1055
+ *
1056
+ * For ordinal position scales only.
1057
+ */
1058
+ fyAlign?: number | ParamRef;
1059
+
1060
+ /**
1061
+ * For *band* scales, how much of the **range** to reserve to separate
1062
+ * adjacent bands; defaults to 0.1 (10%). For *point* scales, the amount of
1063
+ * inset for the first and last value as a proportion of the bandwidth;
1064
+ * defaults to 0.5 (50%).
1065
+ *
1066
+ * For ordinal position scales only.
1067
+ */
1068
+ fyPadding?: number | ParamRef;
1069
+
1070
+ /**
1071
+ * For a *band* scale, how much of the range to reserve to separate
1072
+ * adjacent bands.
1073
+ */
1074
+ fyPaddingInner?: number | ParamRef;
1075
+
1076
+ /**
1077
+ * For a *band* scale, how much of the range to reserve to inset first and
1078
+ * last bands.
1079
+ */
1080
+ fyPaddingOuter?: number | ParamRef;
1081
+
1082
+ /**
1083
+ * The side of the frame on which to place the implicit axis: *left* or
1084
+ * *right* for *fy*. Defaults to *left* for an *fy* scale.
1085
+ *
1086
+ * If *both*, an implicit axis will be rendered on both sides of the plot
1087
+ * (*left* and *right* for *fy*). If null, the implicit axis is suppressed.
1088
+ */
1089
+ fyAxis?: 'left' | 'right' | 'both' | boolean | null | ParamRef;
1090
+
1091
+ /**
1092
+ * The desired approximate number of axis ticks, or an explicit array of tick
1093
+ * values, or an interval such as *day* or *month*.
1094
+ */
1095
+ fyTicks?: number | Interval | any[] | ParamRef;
1096
+
1097
+ /**
1098
+ * The length of axis tick marks in pixels; negative values extend in the
1099
+ * opposite direction. Defaults to 6 for *x* and *y* axes and *color* and
1100
+ * *opacity* *ramp* legends, and 0 for *fx* and *fy* axes.
1101
+ */
1102
+ fyTickSize?: number | ParamRef;
1103
+
1104
+ /**
1105
+ * The desired approximate spacing between adjacent axis ticks, affecting the
1106
+ * default **ticks**; defaults to 80 pixels for *x* and *fx*, and 35 pixels
1107
+ * for *y* and *fy*.
1108
+ */
1109
+ fyTickSpacing?: number | ParamRef;
1110
+
1111
+ /**
1112
+ * The distance between an axis tick mark and its associated text label (in
1113
+ * pixels); often defaults to 3, but may be affected by **fyTickSize** and
1114
+ * **fyTickRotate**.
1115
+ */
1116
+ fyTickPadding?: number | ParamRef;
1117
+
1118
+ /**
1119
+ * How to format inputs (abstract values) for axis tick labels; one of:
1120
+ *
1121
+ * - a [d3-format][1] string for numeric scales
1122
+ * - a [d3-time-format][2] string for temporal scales
1123
+ *
1124
+ * [1]: https://d3js.org/d3-time
1125
+ * [2]: https://d3js.org/d3-time-format
1126
+ */
1127
+ fyTickFormat?: string | null | ParamRef;
1128
+
1129
+ /**
1130
+ * The rotation angle of axis tick labels in degrees clocksize; defaults to 0.
1131
+ */
1132
+ fyTickRotate?: number | ParamRef;
1133
+
1134
+ /**
1135
+ * Whether to show a grid aligned with the scale’s ticks. If true, show a grid
1136
+ * with the currentColor stroke; if a string, show a grid with the specified
1137
+ * stroke color; if an approximate number of ticks, an interval, or an array
1138
+ * of tick values, show corresponding grid lines. See also the grid mark.
1139
+ *
1140
+ * For axes only.
1141
+ */
1142
+ fyGrid?: boolean | string | Interval | any[] | ParamRef;
1143
+
1144
+ /**
1145
+ * If true, draw a line along the axis; if false (default), do not.
1146
+ */
1147
+ fyLine?: boolean | ParamRef;
1148
+
1149
+ /**
1150
+ * A textual label to show on the axis or legend; if null, show no label. By
1151
+ * default the scale label is inferred from channel definitions, possibly with
1152
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
1153
+ *
1154
+ * For axes and legends only.
1155
+ */
1156
+ fyLabel?: string | null | ParamRef;
1157
+
1158
+ /**
1159
+ * Where to place the axis **label** relative to the plot’s frame. For
1160
+ * vertical position scales (*y* and *fy*), may be *top*, *bottom*, or
1161
+ * *center*; for horizontal position scales (*x* and *fx*), may be *left*,
1162
+ * *right*, or *center*. Defaults to *center* for ordinal scales (including
1163
+ * *fx* and *fy*), and otherwise *top* for *y*, and *right* for *x*.
1164
+ */
1165
+ fyLabelAnchor?: 'top' | 'right' | 'bottom' | 'left' | 'center' | ParamRef;
1166
+
1167
+ /**
1168
+ * The axis **label** position offset (in pixels); default depends on margins
1169
+ * and orientation.
1170
+ */
1171
+ fyLabelOffset?: number | ParamRef;
1172
+
1173
+ /**
1174
+ * The font-variant attribute for axis ticks; defaults to *tabular-nums* for
1175
+ * quantitative axes.
1176
+ */
1177
+ fyFontVariant?: string | ParamRef;
1178
+
1179
+ /**
1180
+ * A short label representing the axis in the accessibility tree.
1181
+ */
1182
+ fyAriaLabel?: string | ParamRef;
1183
+
1184
+ /**
1185
+ * A textual description for the axis in the accessibility tree.
1186
+ */
1187
+ fyAriaDescription?: string | ParamRef;
1188
+
1189
+ /**
1190
+ * Whether to reverse the scale’s encoding; equivalent to reversing either the
1191
+ * **domain** or **range**.
1192
+ */
1193
+ fyReverse?: boolean | ParamRef;
1194
+
1195
+
1196
+ // color scale attributes
1197
+
1198
+ /**
1199
+ * The *color* scale type, affecting how the scale encodes abstract data, say
1200
+ * by applying a mathematical transformation. If null, the scale is disabled.
1201
+ *
1202
+ * For quantitative data (numbers), defaults to *linear*; for temporal data
1203
+ * (dates), defaults to *utc*; for ordinal data (strings or booleans),
1204
+ * defaults to *point* for position scales, *categorical* for color scales,
1205
+ * and otherwise *ordinal*.
1206
+ */
1207
+ colorScale?: ColorScaleType | null | ParamRef;
1208
+
1209
+ /**
1210
+ * The extent of the scale’s inputs (abstract values). By default inferred
1211
+ * from channel values. For continuous data (numbers and dates), it is
1212
+ * typically [*min*, *max*]; it can be [*max*, *min*] to reverse the scale.
1213
+ * For ordinal data (strings or booleans), it is an array (or iterable) of
1214
+ * values is the desired order, defaulting to natural ascending order.
1215
+ */
1216
+ colorDomain?: any[] | Fixed | ParamRef;
1217
+
1218
+ /**
1219
+ * The extent of the scale’s outputs (visual values). By default inferred from
1220
+ * the scale’s **type** and **domain**. For other ordinal data, it is an array
1221
+ * (or iterable) of output values in the same order as the **domain**.
1222
+ */
1223
+ colorRange?: any[] | Fixed | ParamRef;
1224
+
1225
+ /**
1226
+ * If true, values below the domain minimum are treated as the domain minimum,
1227
+ * and values above the domain maximum are treated as the domain maximum.
1228
+ *
1229
+ * Clamping is useful for focusing on a subset of the data while ensuring that
1230
+ * extreme values remain visible, but use caution: clamped values may need an
1231
+ * annotation to avoid misinterpretation. Clamping typically requires setting
1232
+ * an explicit **domain** since if the domain is inferred, no values will be
1233
+ * outside the domain.
1234
+ *
1235
+ * For continuous scales only.
1236
+ */
1237
+ colorClamp?: boolean | ParamRef;
1238
+
1239
+ /**
1240
+ * For a *quantile* scale, the number of quantiles (creates *n* - 1
1241
+ * thresholds); for a *quantize* scale, the approximate number of thresholds;
1242
+ * defaults to 5.
1243
+ */
1244
+ colorN?: number | ParamRef;
1245
+
1246
+ /**
1247
+ * If true, or a tick count or interval, extend the domain to nice round
1248
+ * values. Defaults to 1, 2 or 5 times a power of 10 for *linear* scales, and
1249
+ * nice time intervals for *utc* and *time* scales. Pass an interval such as
1250
+ * *minute*, *wednesday* or *month* to specify what constitutes a nice
1251
+ * interval.
1252
+ *
1253
+ * For continuous scales only.
1254
+ */
1255
+ colorNice?: boolean | number | Interval | ParamRef;
1256
+
1257
+ /**
1258
+ * If specified, shorthand for setting the **colorRange**
1259
+ * or **colorInterpolate** option of a *color* scale.
1260
+ */
1261
+ colorScheme?: ColorScheme | ParamRef;
1262
+
1263
+ /**
1264
+ * How to interpolate color range values. For quantitative scales only.
1265
+ * This attribute can be used to specify a color space for interpolating
1266
+ * colors specified in the **colorRange**.
1267
+ */
1268
+ colorInterpolate?: Interpolate | ParamRef;
1269
+
1270
+ /**
1271
+ * For a diverging color scale, the input value (abstract value) that divides
1272
+ * the domain into two parts; defaults to 0 for *diverging* scales, dividing
1273
+ * the domain into negative and positive parts; defaults to 1 for
1274
+ * *diverging-log* scales. By default, diverging scales are symmetric around
1275
+ * the pivot; see the **symmetric** option.
1276
+ */
1277
+ colorPivot?: any | ParamRef;
1278
+
1279
+ /**
1280
+ * For a diverging color scale, if true (the default), extend the domain to
1281
+ * ensure that the lower part of the domain (below the **pivot**) is
1282
+ * commensurate with the upper part of the domain (above the **pivot**).
1283
+ *
1284
+ * A symmetric diverging color scale may not use all of its output **range**;
1285
+ * this reduces contrast but ensures that deviations both below and above the
1286
+ * **pivot** are represented proportionally. Otherwise if false, the full
1287
+ * output **range** will be used; this increases contrast but values on
1288
+ * opposite sides of the **pivot** may not be meaningfully compared.
1289
+ */
1290
+ colorSymmetric?: boolean | ParamRef;
1291
+
1292
+ /**
1293
+ * A textual label to show on the axis or legend; if null, show no label. By
1294
+ * default the scale label is inferred from channel definitions, possibly with
1295
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
1296
+ *
1297
+ * For axes and legends only.
1298
+ */
1299
+ colorLabel?: string | null | ParamRef;
1300
+
1301
+ /**
1302
+ * If true, shorthand for a transform suitable for percentages, mapping
1303
+ * proportions in [0, 1] to [0, 100].
1304
+ */
1305
+ colorPercent?: boolean | ParamRef;
1306
+
1307
+ /**
1308
+ * Whether to reverse the scale’s encoding; equivalent to reversing either the
1309
+ * **domain** or **range**.
1310
+ */
1311
+ colorReverse?: boolean | ParamRef;
1312
+
1313
+ /**
1314
+ * Whether the **domain** must include zero. If the domain minimum is
1315
+ * positive, it will be set to zero; otherwise if the domain maximum is
1316
+ * negative, it will be set to zero.
1317
+ *
1318
+ * For quantitative scales only.
1319
+ */
1320
+ colorZero?: boolean | ParamRef;
1321
+
1322
+ /**
1323
+ * How to format inputs (abstract values) for axis tick labels; one of:
1324
+ *
1325
+ * - a [d3-format][1] string for numeric scales
1326
+ * - a [d3-time-format][2] string for temporal scales
1327
+ *
1328
+ * [1]: https://d3js.org/d3-time
1329
+ * [2]: https://d3js.org/d3-time-format
1330
+ */
1331
+ colorTickFormat?: string | null | ParamRef;
1332
+
1333
+ /**
1334
+ * A power scale’s exponent (*e.g.*, 0.5 for sqrt); defaults to 1 for a
1335
+ * linear scale. For *pow* and *diverging-pow* scales only.
1336
+ */
1337
+ colorExponent?: number | ParamRef;
1338
+
1339
+ /**
1340
+ * A log scale’s base; defaults to 10. Does not affect the scale’s encoding,
1341
+ * but rather the default ticks. For *log* and *diverging-log* scales only.
1342
+ */
1343
+ colorBase?: number | ParamRef;
1344
+
1345
+ /**
1346
+ * A symlog scale’s constant, expressing the magnitude of the linear region
1347
+ * around the origin; defaults to 1. For *symlog* and *diverging-symlog*
1348
+ * scales only.
1349
+ */
1350
+ colorConstant?: number | ParamRef;
1351
+
1352
+
1353
+ // opacity scale attributes
1354
+
1355
+ /**
1356
+ * The *opacity* scale type, affecting how the scale encodes abstract data,
1357
+ * say by applying a mathematical transformation. If null, the scale is
1358
+ * disabled. The opacity scale defaults to *linear*; this scales is intended
1359
+ * for quantitative data.
1360
+ */
1361
+ opacityScale?: ContinuousScaleType | null | ParamRef;
1362
+
1363
+ /**
1364
+ * The extent of the scale’s inputs (abstract values). By default inferred
1365
+ * from channel values. For continuous data (numbers and dates), it is
1366
+ * typically [*min*, *max*]; it can be [*max*, *min*] to reverse the scale.
1367
+ * For ordinal data (strings or booleans), it is an array (or iterable) of
1368
+ * values is the desired order, defaulting to natural ascending order.
1369
+ *
1370
+ * Opacity scales have a default domain from 0 to the maximum value of
1371
+ * associated channels.
1372
+ */
1373
+ opacityDomain?: any[] | Fixed | ParamRef;
1374
+
1375
+ /**
1376
+ * The extent of the scale’s outputs (visual values).
1377
+ *
1378
+ * Opacity scales have a default range of [0, 1].
1379
+ */
1380
+ opacityRange?: any[] | Fixed | ParamRef;
1381
+
1382
+ /**
1383
+ * If true, values below the domain minimum are treated as the domain minimum,
1384
+ * and values above the domain maximum are treated as the domain maximum.
1385
+ *
1386
+ * Clamping is useful for focusing on a subset of the data while ensuring that
1387
+ * extreme values remain visible, but use caution: clamped values may need an
1388
+ * annotation to avoid misinterpretation. Clamping typically requires setting
1389
+ * an explicit **domain** since if the domain is inferred, no values will be
1390
+ * outside the domain.
1391
+ *
1392
+ * For continuous scales only.
1393
+ */
1394
+ opacityClamp?: boolean | ParamRef;
1395
+
1396
+ /**
1397
+ * If true, or a tick count or interval, extend the domain to nice round
1398
+ * values. Defaults to 1, 2 or 5 times a power of 10 for *linear* scales, and
1399
+ * nice time intervals for *utc* and *time* scales. Pass an interval such as
1400
+ * *minute*, *wednesday* or *month* to specify what constitutes a nice
1401
+ * interval.
1402
+ *
1403
+ * For continuous scales only.
1404
+ */
1405
+ opacityNice?: boolean | number| Interval | ParamRef;
1406
+
1407
+ /**
1408
+ * A textual label to show on the axis or legend; if null, show no label. By
1409
+ * default the scale label is inferred from channel definitions, possibly with
1410
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
1411
+ *
1412
+ * For axes and legends only.
1413
+ */
1414
+ opacityLabel?: string | null | ParamRef;
1415
+
1416
+ /**
1417
+ * If true, shorthand for a transform suitable for percentages, mapping
1418
+ * proportions in [0, 1] to [0, 100].
1419
+ */
1420
+ opacityPercent?: boolean | ParamRef;
1421
+
1422
+ /**
1423
+ * Whether to reverse the scale’s encoding; equivalent to reversing either the
1424
+ * **domain** or **range**.
1425
+ */
1426
+ opacityReverse?: boolean | ParamRef;
1427
+
1428
+ /**
1429
+ * Whether the **domain** must include zero. If the domain minimum is
1430
+ * positive, it will be set to zero; otherwise if the domain maximum is
1431
+ * negative, it will be set to zero.
1432
+ *
1433
+ * For quantitative scales only.
1434
+ */
1435
+ opacityZero?: boolean | ParamRef;
1436
+
1437
+ /**
1438
+ * How to format inputs (abstract values) for axis tick labels; one of:
1439
+ *
1440
+ * - a [d3-format][1] string for numeric scales
1441
+ * - a [d3-time-format][2] string for temporal scales
1442
+ *
1443
+ * [1]: https://d3js.org/d3-time
1444
+ * [2]: https://d3js.org/d3-time-format
1445
+ */
1446
+ opacityTickFormat?: string | null | ParamRef;
1447
+
1448
+ /**
1449
+ * A power scale’s exponent (*e.g.*, 0.5 for sqrt); defaults to 1 for a
1450
+ * linear scale. For *pow* scales only.
1451
+ */
1452
+ opacityExponent?: number | ParamRef;
1453
+
1454
+ /**
1455
+ * A log scale’s base; defaults to 10. Does not affect the scale’s encoding,
1456
+ * but rather the default ticks. For *log* scales only.
1457
+ */
1458
+ opacityBase?: number | ParamRef;
1459
+
1460
+ /**
1461
+ * A symlog scale’s constant, expressing the magnitude of the linear region
1462
+ * around the origin; defaults to 1. For *symlog* scales only.
1463
+ */
1464
+ opacityConstant?: number | ParamRef;
1465
+
1466
+
1467
+ // symbol scale attributes
1468
+
1469
+ /**
1470
+ * The *symbol* scale type, affecting how the scale encodes abstract data,
1471
+ * say by applying a mathematical transformation. If null, the scale is
1472
+ * disabled. Defaults to an *ordinal* scale type.
1473
+ */
1474
+ symbolScale?: DiscreteScaleType | null | ParamRef;
1475
+
1476
+ /**
1477
+ * The extent of the scale’s inputs (abstract values). By default inferred
1478
+ * from channel values. As symbol scales are discrete, the domain is an array
1479
+ * (or iterable) of values is the desired order, defaulting to natural
1480
+ * ascending order.
1481
+ */
1482
+ symbolDomain?: any[] | Fixed | ParamRef;
1483
+
1484
+ /**
1485
+ * The extent of the scale’s outputs (visual values). By default inferred from
1486
+ * the scale’s **type** and **domain**, and for position scales, the plot’s
1487
+ * dimensions. For continuous data (numbers and dates), and for ordinal
1488
+ * position scales (*point* and *band*), it is typically [*min*, *max*]; it
1489
+ * can be [*max*, *min*] to reverse the scale. For other ordinal data, such as
1490
+ * for a *color* scale, it is an array (or iterable) of output values in the
1491
+ * same order as the **domain**.
1492
+ *
1493
+ * Symbol scales have a default range of categorical symbols; the choice of
1494
+ * symbols depends on whether the associated dot mark is filled or stroked.
1495
+ */
1496
+ symbolRange?: any[] | Fixed | ParamRef;
1497
+
1498
+
1499
+ // r scale attributes
1500
+
1501
+ /**
1502
+ * The *r* (radius) scale type, affecting how the scale encodes abstract
1503
+ * data, say by applying a mathematical transformation. If null, the scale
1504
+ * is disabled. The radius scale defaults to *sqrt*; this scale is intended
1505
+ * for quantitative data.
1506
+ */
1507
+ rScale?: ContinuousScaleType | null | ParamRef;
1508
+
1509
+ /**
1510
+ * The extent of the scale’s inputs (abstract values). By default inferred
1511
+ * from channel values. For continuous data (numbers and dates), it is
1512
+ * typically [*min*, *max*]; it can be [*max*, *min*] to reverse the scale.
1513
+ * For ordinal data (strings or booleans), it is an array (or iterable) of
1514
+ * values is the desired order, defaulting to natural ascending order.
1515
+ *
1516
+ * Radius scales have a default domain from 0 to the median first quartile
1517
+ * of associated channels.
1518
+ */
1519
+ rDomain?: any[] | Fixed | ParamRef;
1520
+
1521
+ /**
1522
+ * The extent of the scale’s outputs (visual values). By default inferred from
1523
+ * the scale’s **type** and **domain**, and for position scales, the plot’s
1524
+ * dimensions. For continuous data (numbers and dates), and for ordinal
1525
+ * position scales (*point* and *band*), it is typically [*min*, *max*]; it
1526
+ * can be [*max*, *min*] to reverse the scale. For other ordinal data, such as
1527
+ * for a *color* scale, it is an array (or iterable) of output values in the
1528
+ * same order as the **domain**.
1529
+ *
1530
+ * Radius scales have a default range of [0, 3].
1531
+ */
1532
+ rRange?: any[] | Fixed | ParamRef;
1533
+
1534
+ /**
1535
+ * If true, values below the domain minimum are treated as the domain minimum,
1536
+ * and values above the domain maximum are treated as the domain maximum.
1537
+ *
1538
+ * Clamping is useful for focusing on a subset of the data while ensuring that
1539
+ * extreme values remain visible, but use caution: clamped values may need an
1540
+ * annotation to avoid misinterpretation. Clamping typically requires setting
1541
+ * an explicit **domain** since if the domain is inferred, no values will be
1542
+ * outside the domain.
1543
+ *
1544
+ * For continuous scales only.
1545
+ */
1546
+ rClamp?: any;
1547
+
1548
+ /**
1549
+ * If true, or a tick count or interval, extend the domain to nice round
1550
+ * values. Defaults to 1, 2 or 5 times a power of 10 for *linear* scales, and
1551
+ * nice time intervals for *utc* and *time* scales. Pass an interval such as
1552
+ * *minute*, *wednesday* or *month* to specify what constitutes a nice
1553
+ * interval.
1554
+ *
1555
+ * For continuous scales only.
1556
+ */
1557
+ rNice?: boolean | number| Interval | ParamRef;
1558
+
1559
+ /**
1560
+ * If true, shorthand for a transform suitable for percentages, mapping
1561
+ * proportions in [0, 1] to [0, 100].
1562
+ */
1563
+ rPercent?: boolean | ParamRef;
1564
+
1565
+ /**
1566
+ * Whether the **domain** must include zero. If the domain minimum is
1567
+ * positive, it will be set to zero; otherwise if the domain maximum is
1568
+ * negative, it will be set to zero.
1569
+ *
1570
+ * For quantitative scales only.
1571
+ */
1572
+ rZero?: boolean | ParamRef;
1573
+
1574
+ /**
1575
+ * A power scale’s exponent (*e.g.*, 0.5 for sqrt); defaults to 1 for a
1576
+ * linear scale. For *pow* scales only.
1577
+ */
1578
+ rExponent?: number | ParamRef;
1579
+
1580
+ /**
1581
+ * A log scale’s base; defaults to 10. Does not affect the scale’s encoding,
1582
+ * but rather the default ticks. For *log* scales only.
1583
+ */
1584
+ rBase?: number | ParamRef;
1585
+
1586
+ /**
1587
+ * A symlog scale’s constant, expressing the magnitude of the linear region
1588
+ * around the origin; defaults to 1. For *symlog* scales only.
1589
+ */
1590
+ rConstant?: number | ParamRef;
1591
+
1592
+
1593
+ // length scale attributes
1594
+
1595
+ /**
1596
+ * The *length* scale type, affecting how the scale encodes abstract data,
1597
+ * say by applying a mathematical transformation. If null, the scale is
1598
+ * disabled. The length scale defaults to *linear*, as this scale is intended
1599
+ * for quantitative data.
1600
+ */
1601
+ lengthScale?: ContinuousScaleType | null | ParamRef;
1602
+
1603
+ /**
1604
+ * The extent of the scale’s inputs (abstract values). By default inferred
1605
+ * from channel values. For continuous data (numbers and dates), it is
1606
+ * typically [*min*, *max*]; it can be [*max*, *min*] to reverse the scale.
1607
+ * For ordinal data (strings or booleans), it is an array (or iterable) of
1608
+ * values is the desired order, defaulting to natural ascending order.
1609
+ *
1610
+ * Linear scales have a default domain of [0, 1]. Log scales have a default
1611
+ * domain of [1, 10] and cannot include zero. Radius scales have a default
1612
+ * domain from 0 to the median first quartile of associated channels. Length
1613
+ * have a default domain from 0 to the median median of associated channels.
1614
+ * Opacity scales have a default domain from 0 to the maximum value of
1615
+ * associated channels.
1616
+ */
1617
+ lengthDomain?: any[] | Fixed | ParamRef;
1618
+
1619
+ /**
1620
+ * The extent of the scale’s outputs (visual values). By default inferred from
1621
+ * the scale’s **type** and **domain**, and for position scales, the plot’s
1622
+ * dimensions. For continuous data (numbers and dates), and for ordinal
1623
+ * position scales (*point* and *band*), it is typically [*min*, *max*]; it
1624
+ * can be [*max*, *min*] to reverse the scale. For other ordinal data, such as
1625
+ * for a *color* scale, it is an array (or iterable) of output values in the
1626
+ * same order as the **domain**.
1627
+ *
1628
+ * Length scales have a default range of [0, 12].
1629
+ */
1630
+ lengthRange?: any[] | Fixed | ParamRef;
1631
+
1632
+ /**
1633
+ * If true, values below the domain minimum are treated as the domain minimum,
1634
+ * and values above the domain maximum are treated as the domain maximum.
1635
+ *
1636
+ * Clamping is useful for focusing on a subset of the data while ensuring that
1637
+ * extreme values remain visible, but use caution: clamped values may need an
1638
+ * annotation to avoid misinterpretation. Clamping typically requires setting
1639
+ * an explicit **domain** since if the domain is inferred, no values will be
1640
+ * outside the domain.
1641
+ *
1642
+ * For continuous scales only.
1643
+ */
1644
+ lengthClamp?: any;
1645
+
1646
+ /**
1647
+ * If true, or a tick count or interval, extend the domain to nice round
1648
+ * values. Defaults to 1, 2 or 5 times a power of 10 for *linear* scales, and
1649
+ * nice time intervals for *utc* and *time* scales. Pass an interval such as
1650
+ * *minute*, *wednesday* or *month* to specify what constitutes a nice
1651
+ * interval.
1652
+ *
1653
+ * For continuous scales only.
1654
+ */
1655
+ lengthNice?: boolean | number| Interval | ParamRef;
1656
+
1657
+ /**
1658
+ * If true, shorthand for a transform suitable for percentages, mapping
1659
+ * proportions in [0, 1] to [0, 100].
1660
+ */
1661
+ lengthPercent?: boolean | ParamRef;
1662
+
1663
+ /**
1664
+ * Whether the **domain** must include zero. If the domain minimum is
1665
+ * positive, it will be set to zero; otherwise if the domain maximum is
1666
+ * negative, it will be set to zero.
1667
+ *
1668
+ * For quantitative scales only.
1669
+ */
1670
+ lengthZero?: boolean | ParamRef;
1671
+
1672
+ /**
1673
+ * A power scale’s exponent (*e.g.*, 0.5 for sqrt); defaults to 1 for a
1674
+ * linear scale. For *pow* scales only.
1675
+ */
1676
+ lengthExponent?: number | ParamRef;
1677
+
1678
+ /**
1679
+ * A log scale’s base; defaults to 10. Does not affect the scale’s encoding,
1680
+ * but rather the default ticks. For *log* scales only.
1681
+ */
1682
+ lengthBase?: number | ParamRef;
1683
+
1684
+ /**
1685
+ * A symlog scale’s constant, expressing the magnitude of the linear region
1686
+ * around the origin; defaults to 1. For *symlog* scales only.
1687
+ */
1688
+ lengthConstant?: number | ParamRef;
1689
+
1690
+
1691
+ // projection attributes
1692
+
1693
+ /**
1694
+ * The desired projection; one of:
1695
+ *
1696
+ * - a named built-in projection such as *albers-usa*
1697
+ * - null, for no projection
1698
+ *
1699
+ * Named projections are scaled and translated to fit
1700
+ * the **domain** to the plot’s frame (minus insets).
1701
+ */
1702
+ projectionType?: ProjectionName | null | ParamRef;
1703
+
1704
+ /**
1705
+ * A GeoJSON object to fit to the plot’s frame (minus insets); defaults to a
1706
+ * Sphere for spherical projections (outline of the the whole globe).
1707
+ */
1708
+ projectionDomain?: object | ParamRef;
1709
+
1710
+ /**
1711
+ * A rotation of the sphere before projection; defaults to [0, 0, 0].
1712
+ * Specified as Euler angles λ (yaw, or reference longitude), φ (pitch, or
1713
+ * reference latitude), and optionally γ (roll), in degrees.
1714
+ */
1715
+ projectionRotate?:
1716
+ | [x: number | ParamRef, y: number | ParamRef, z?: number | ParamRef]
1717
+ | ParamRef;
1718
+
1719
+ /**
1720
+ * The [standard parallels][1]. For conic projections only.
1721
+ *
1722
+ * [1]: https://d3js.org/d3-geo/conic#conic_parallels
1723
+ */
1724
+ projectionParallels?: [y1: number | ParamRef, y2: number | ParamRef] | ParamRef;
1725
+
1726
+ /**
1727
+ * The projection’s [sampling threshold][1].
1728
+ *
1729
+ * [1]: https://d3js.org/d3-geo/projection#projection_precision
1730
+ */
1731
+ projectionPrecision?: number | ParamRef;
1732
+
1733
+ /**
1734
+ * The projection’s clipping method; one of:
1735
+ *
1736
+ * - *frame* or true (default) - clip to the plot’s frame (including margins but not insets)
1737
+ * - a number - clip to a circle of the given radius in degrees centered around the origin
1738
+ * - null or false - do not clip
1739
+ *
1740
+ * Some projections (such as [*armadillo*][1] and [*berghaus*][2]) require
1741
+ * spherical clipping: in that case set the marks’ **clip** option to
1742
+ * *sphere*.
1743
+ *
1744
+ * [1]: https://observablehq.com/@d3/armadillo
1745
+ * [2]: https://observablehq.com/@d3/berghaus-star
1746
+ */
1747
+ projectionClip?: boolean | number | 'frame' | null | ParamRef;
1748
+
1749
+ /**
1750
+ * Shorthand to set the same default for all four projection insets.
1751
+ * All insets typically default to zero, though not always. A positive
1752
+ * inset reduces effective area, while a negative inset increases it.
1753
+ */
1754
+ projectionInset?: number | ParamRef;
1755
+
1756
+ /**
1757
+ * Insets the top edge of the projection by the specified number of pixels.
1758
+ * A positive value insets towards the bottom edge (reducing effective area),
1759
+ * while a negative value insets away from the bottom edge (increasing it).
1760
+ */
1761
+ projectionInsetTop?: number | ParamRef;
1762
+
1763
+ /**
1764
+ * Insets the right edge of the projection by the specified number of pixels.
1765
+ * A positive value insets towards the left edge (reducing effective area),
1766
+ * while a negative value insets away from the left edge (increasing it).
1767
+ */
1768
+ projectionInsetRight?: number | ParamRef;
1769
+
1770
+ /**
1771
+ * Insets the bottom edge of the projection by the specified number of pixels.
1772
+ * A positive value insets towards the top edge (reducing effective area),
1773
+ * while a negative value insets away from the top edge (increasing it).
1774
+ */
1775
+ projectionInsetBottom?: number | ParamRef;
1776
+
1777
+ /**
1778
+ * Insets the left edge of the projection by the specified number of pixels.
1779
+ * A positive value insets towards the right edge (reducing effective area),
1780
+ * while a negative value insets away from the right edge (increasing it).
1781
+ */
1782
+ projectionInsetLeft?: number | ParamRef;
1783
+ }