@uwdata/mosaic-spec 0.17.0 → 0.19.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 (191) hide show
  1. package/LICENSE +47 -0
  2. package/README.md +1 -1
  3. package/dist/mosaic-schema.json +201110 -0
  4. package/dist/src/ast/ASTNode.d.ts +27 -0
  5. package/dist/src/ast/ASTNode.d.ts.map +1 -0
  6. package/dist/src/ast/ColumnParamRefNode.d.ts +9 -0
  7. package/dist/src/ast/ColumnParamRefNode.d.ts.map +1 -0
  8. package/dist/src/ast/DataNode.d.ts +61 -0
  9. package/dist/src/ast/DataNode.d.ts.map +1 -0
  10. package/dist/src/ast/ExpressionNode.d.ts +14 -0
  11. package/dist/src/ast/ExpressionNode.d.ts.map +1 -0
  12. package/dist/src/ast/HConcatNode.d.ts +11 -0
  13. package/dist/src/ast/HConcatNode.d.ts.map +1 -0
  14. package/dist/src/ast/HSpaceNode.d.ts +12 -0
  15. package/dist/src/ast/HSpaceNode.d.ts.map +1 -0
  16. package/dist/src/ast/InputNode.d.ts +9 -0
  17. package/dist/src/ast/InputNode.d.ts.map +1 -0
  18. package/dist/src/ast/LiteralNode.d.ts +8 -0
  19. package/dist/src/ast/LiteralNode.d.ts.map +1 -0
  20. package/dist/src/ast/OptionsNode.d.ts +11 -0
  21. package/dist/src/ast/OptionsNode.d.ts.map +1 -0
  22. package/dist/src/ast/ParamNode.d.ts +9 -0
  23. package/dist/src/ast/ParamNode.d.ts.map +1 -0
  24. package/dist/src/ast/ParamRefNode.d.ts +9 -0
  25. package/dist/src/ast/ParamRefNode.d.ts.map +1 -0
  26. package/dist/src/ast/PlotAttributeNode.d.ts +19 -0
  27. package/dist/src/ast/PlotAttributeNode.d.ts.map +1 -0
  28. package/dist/src/ast/PlotFromNode.d.ts +10 -0
  29. package/dist/src/ast/PlotFromNode.d.ts.map +1 -0
  30. package/dist/src/ast/PlotInteractorNode.d.ts +9 -0
  31. package/dist/src/ast/PlotInteractorNode.d.ts.map +1 -0
  32. package/dist/src/ast/PlotLegendNode.d.ts +11 -0
  33. package/dist/src/ast/PlotLegendNode.d.ts.map +1 -0
  34. package/dist/src/ast/PlotMarkNode.d.ts +11 -0
  35. package/dist/src/ast/PlotMarkNode.d.ts.map +1 -0
  36. package/dist/src/ast/PlotNode.d.ts +12 -0
  37. package/dist/src/ast/PlotNode.d.ts.map +1 -0
  38. package/dist/src/ast/SelectionNode.d.ts +25 -0
  39. package/dist/src/ast/SelectionNode.d.ts.map +1 -0
  40. package/dist/src/ast/SpecNode.d.ts +11 -0
  41. package/dist/src/ast/SpecNode.d.ts.map +1 -0
  42. package/dist/src/ast/TransformNode.d.ts +22 -0
  43. package/dist/src/ast/TransformNode.d.ts.map +1 -0
  44. package/dist/src/ast/VConcatNode.d.ts +11 -0
  45. package/dist/src/ast/VConcatNode.d.ts.map +1 -0
  46. package/dist/src/ast/VSpaceNode.d.ts +12 -0
  47. package/dist/src/ast/VSpaceNode.d.ts.map +1 -0
  48. package/dist/src/ast/WindowFrameNode.d.ts +16 -0
  49. package/dist/src/ast/WindowFrameNode.d.ts.map +1 -0
  50. package/dist/src/ast-to-dom.d.ts +41 -0
  51. package/dist/src/ast-to-dom.d.ts.map +1 -0
  52. package/dist/src/ast-to-esm.d.ts +65 -0
  53. package/dist/src/ast-to-esm.d.ts.map +1 -0
  54. package/dist/src/config/components.d.ts +5 -0
  55. package/dist/src/config/components.d.ts.map +1 -0
  56. package/dist/src/config/extensions.d.ts +10 -0
  57. package/dist/src/config/extensions.d.ts.map +1 -0
  58. package/dist/src/config/inputs.d.ts +6 -0
  59. package/dist/src/config/inputs.d.ts.map +1 -0
  60. package/dist/src/config/plots.d.ts +35 -0
  61. package/dist/src/config/plots.d.ts.map +1 -0
  62. package/dist/src/config/transforms.d.ts +5 -0
  63. package/dist/src/config/transforms.d.ts.map +1 -0
  64. package/dist/src/constants.d.ts +33 -0
  65. package/dist/src/constants.d.ts.map +1 -0
  66. package/dist/src/index.d.ts +30 -0
  67. package/dist/src/index.d.ts.map +1 -0
  68. package/dist/src/parse-spec.d.ts +112 -0
  69. package/dist/src/parse-spec.d.ts.map +1 -0
  70. package/dist/src/spec/CSSStyles.d.ts +4 -0
  71. package/dist/src/spec/CSSStyles.d.ts.map +1 -0
  72. package/dist/src/spec/Data.d.ts +166 -0
  73. package/dist/src/spec/Data.d.ts.map +1 -0
  74. package/dist/src/spec/Expression.d.ts +28 -0
  75. package/dist/src/spec/Expression.d.ts.map +1 -0
  76. package/dist/src/spec/HConcat.d.ts +9 -0
  77. package/dist/src/spec/HConcat.d.ts.map +1 -0
  78. package/dist/src/spec/HSpace.d.ts +10 -0
  79. package/dist/src/spec/HSpace.d.ts.map +1 -0
  80. package/dist/src/spec/Input.d.ts +218 -0
  81. package/dist/src/spec/Input.d.ts.map +1 -0
  82. package/dist/src/spec/Interval.d.ts +59 -0
  83. package/dist/src/spec/Interval.d.ts.map +1 -0
  84. package/dist/src/spec/Param.d.ts +64 -0
  85. package/dist/src/spec/Param.d.ts.map +1 -0
  86. package/dist/src/spec/Plot.d.ts +15 -0
  87. package/dist/src/spec/Plot.d.ts.map +1 -0
  88. package/dist/src/spec/PlotAttribute.d.ts +1535 -0
  89. package/dist/src/spec/PlotAttribute.d.ts.map +1 -0
  90. package/dist/src/spec/PlotFrom.d.ts +21 -0
  91. package/dist/src/spec/PlotFrom.d.ts.map +1 -0
  92. package/dist/src/spec/PlotInteractor.d.ts +10 -0
  93. package/dist/src/spec/PlotInteractor.d.ts.map +1 -0
  94. package/dist/src/spec/PlotLegend.d.ts +69 -0
  95. package/dist/src/spec/PlotLegend.d.ts.map +1 -0
  96. package/dist/src/spec/PlotMark.d.ts +29 -0
  97. package/dist/src/spec/PlotMark.d.ts.map +1 -0
  98. package/dist/src/spec/PlotTypes.d.ts +294 -0
  99. package/dist/src/spec/PlotTypes.d.ts.map +1 -0
  100. package/dist/src/spec/Spec.d.ts +53 -0
  101. package/dist/src/spec/Spec.d.ts.map +1 -0
  102. package/dist/src/spec/Transform.d.ts +393 -0
  103. package/dist/src/spec/Transform.d.ts.map +1 -0
  104. package/dist/src/spec/VConcat.d.ts +9 -0
  105. package/dist/src/spec/VConcat.d.ts.map +1 -0
  106. package/dist/src/spec/VSpace.d.ts +10 -0
  107. package/dist/src/spec/VSpace.d.ts.map +1 -0
  108. package/dist/src/spec/interactors/BrushStyles.d.ts +28 -0
  109. package/dist/src/spec/interactors/BrushStyles.d.ts.map +1 -0
  110. package/dist/src/spec/interactors/Highlight.d.ts +38 -0
  111. package/dist/src/spec/interactors/Highlight.d.ts.map +1 -0
  112. package/dist/src/spec/interactors/Interval1D.d.ts +43 -0
  113. package/dist/src/spec/interactors/Interval1D.d.ts.map +1 -0
  114. package/dist/src/spec/interactors/Interval2D.d.ts +48 -0
  115. package/dist/src/spec/interactors/Interval2D.d.ts.map +1 -0
  116. package/dist/src/spec/interactors/Nearest.d.ts +45 -0
  117. package/dist/src/spec/interactors/Nearest.d.ts.map +1 -0
  118. package/dist/src/spec/interactors/PanZoom.d.ts +59 -0
  119. package/dist/src/spec/interactors/PanZoom.d.ts.map +1 -0
  120. package/dist/src/spec/interactors/Region.d.ts +33 -0
  121. package/dist/src/spec/interactors/Region.d.ts.map +1 -0
  122. package/dist/src/spec/interactors/Toggle.d.ts +60 -0
  123. package/dist/src/spec/interactors/Toggle.d.ts.map +1 -0
  124. package/dist/src/spec/marks/Area.d.ts +140 -0
  125. package/dist/src/spec/marks/Area.d.ts.map +1 -0
  126. package/dist/src/spec/marks/Arrow.d.ts +95 -0
  127. package/dist/src/spec/marks/Arrow.d.ts.map +1 -0
  128. package/dist/src/spec/marks/Axis.d.ts +282 -0
  129. package/dist/src/spec/marks/Axis.d.ts.map +1 -0
  130. package/dist/src/spec/marks/Bar.d.ts +151 -0
  131. package/dist/src/spec/marks/Bar.d.ts.map +1 -0
  132. package/dist/src/spec/marks/Cell.d.ts +58 -0
  133. package/dist/src/spec/marks/Cell.d.ts.map +1 -0
  134. package/dist/src/spec/marks/Contour.d.ts +24 -0
  135. package/dist/src/spec/marks/Contour.d.ts.map +1 -0
  136. package/dist/src/spec/marks/Delaunay.d.ts +87 -0
  137. package/dist/src/spec/marks/Delaunay.d.ts.map +1 -0
  138. package/dist/src/spec/marks/DenseLine.d.ts +28 -0
  139. package/dist/src/spec/marks/DenseLine.d.ts.map +1 -0
  140. package/dist/src/spec/marks/Density.d.ts +137 -0
  141. package/dist/src/spec/marks/Density.d.ts.map +1 -0
  142. package/dist/src/spec/marks/Dot.d.ts +134 -0
  143. package/dist/src/spec/marks/Dot.d.ts.map +1 -0
  144. package/dist/src/spec/marks/ErrorBar.d.ts +83 -0
  145. package/dist/src/spec/marks/ErrorBar.d.ts.map +1 -0
  146. package/dist/src/spec/marks/Frame.d.ts +22 -0
  147. package/dist/src/spec/marks/Frame.d.ts.map +1 -0
  148. package/dist/src/spec/marks/Geo.d.ts +54 -0
  149. package/dist/src/spec/marks/Geo.d.ts.map +1 -0
  150. package/dist/src/spec/marks/Hexbin.d.ts +31 -0
  151. package/dist/src/spec/marks/Hexbin.d.ts.map +1 -0
  152. package/dist/src/spec/marks/Hexgrid.d.ts +26 -0
  153. package/dist/src/spec/marks/Hexgrid.d.ts.map +1 -0
  154. package/dist/src/spec/marks/Image.d.ts +90 -0
  155. package/dist/src/spec/marks/Image.d.ts.map +1 -0
  156. package/dist/src/spec/marks/Line.d.ts +83 -0
  157. package/dist/src/spec/marks/Line.d.ts.map +1 -0
  158. package/dist/src/spec/marks/Link.d.ts +61 -0
  159. package/dist/src/spec/marks/Link.d.ts.map +1 -0
  160. package/dist/src/spec/marks/Marks.d.ts +911 -0
  161. package/dist/src/spec/marks/Marks.d.ts.map +1 -0
  162. package/dist/src/spec/marks/Raster.d.ts +125 -0
  163. package/dist/src/spec/marks/Raster.d.ts.map +1 -0
  164. package/dist/src/spec/marks/Rect.d.ts +167 -0
  165. package/dist/src/spec/marks/Rect.d.ts.map +1 -0
  166. package/dist/src/spec/marks/Regression.d.ts +59 -0
  167. package/dist/src/spec/marks/Regression.d.ts.map +1 -0
  168. package/dist/src/spec/marks/Rule.d.ts +101 -0
  169. package/dist/src/spec/marks/Rule.d.ts.map +1 -0
  170. package/dist/src/spec/marks/Text.d.ts +111 -0
  171. package/dist/src/spec/marks/Text.d.ts.map +1 -0
  172. package/dist/src/spec/marks/Tick.d.ts +62 -0
  173. package/dist/src/spec/marks/Tick.d.ts.map +1 -0
  174. package/dist/src/spec/marks/Vector.d.ts +100 -0
  175. package/dist/src/spec/marks/Vector.d.ts.map +1 -0
  176. package/dist/src/spec/marks/Waffle.d.ts +59 -0
  177. package/dist/src/spec/marks/Waffle.d.ts.map +1 -0
  178. package/dist/src/util.d.ts +13 -0
  179. package/dist/src/util.d.ts.map +1 -0
  180. package/package.json +18 -10
  181. package/src/spec/Data.ts +2 -2
  182. package/src/spec/Expression.ts +1 -1
  183. package/src/spec/Input.ts +6 -1
  184. package/src/spec/Spec.ts +1 -1
  185. package/src/spec/Transform.ts +3 -3
  186. package/src/spec/interactors/Interval1D.ts +1 -1
  187. package/src/spec/interactors/Interval2D.ts +1 -1
  188. package/src/spec/interactors/Toggle.ts +5 -5
  189. package/src/spec/marks/ErrorBar.ts +2 -2
  190. package/tsconfig.json +0 -13
  191. package/vitest.config.ts +0 -3
@@ -0,0 +1,282 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { Interval } from '../PlotTypes.js';
3
+ import { MarkOptions } from './Marks.js';
4
+ import { RuleXOptions, RuleYOptions } from './Rule.js';
5
+ import { TextOptions } from './Text.js';
6
+ import { TickXOptions, TickYOptions } from './Tick.js';
7
+ /** The scale options used by axis and grid marks. */
8
+ interface ScaleOptions {
9
+ /**
10
+ * Enforces uniformity for data at regular intervals, such as integer values
11
+ * or daily samples. The interval may be one of:
12
+ *
13
+ * - a named time interval such as *day* (for date intervals)
14
+ * - a number (for number intervals), defining intervals at integer multiples of *n*
15
+ *
16
+ * This option sets the internal transform to the given interval’s
17
+ * *interval*.floor function. In addition, the default **domain** will align
18
+ * with interval boundaries.
19
+ */
20
+ interval?: Interval | ParamRef;
21
+ /**
22
+ * The desired approximate number of axis ticks, or an explicit array of tick
23
+ * values, or an interval such as *day* or *month*.
24
+ */
25
+ ticks?: number | Interval | any[] | ParamRef;
26
+ /**
27
+ * The length of axis tick marks in pixels; negative values extend in the
28
+ * opposite direction. Defaults to 6 for *x* and *y* axes and *color* and
29
+ * *opacity* *ramp* legends, and 0 for *fx* and *fy* axes.
30
+ */
31
+ tickSize?: number | ParamRef;
32
+ /**
33
+ * The desired approximate spacing between adjacent axis ticks, affecting the
34
+ * default **ticks**; defaults to 80 pixels for *x* and *fx*, and 35 pixels
35
+ * for *y* and *fy*.
36
+ */
37
+ tickSpacing?: number | ParamRef;
38
+ /**
39
+ * The distance between an axis tick mark and its associated text label (in
40
+ * pixels); often defaults to 3, but may be affected by **xTickSize** and
41
+ * **xTickRotate**.
42
+ */
43
+ tickPadding?: number | ParamRef;
44
+ /**
45
+ * How to format inputs (abstract values) for axis tick labels; one of:
46
+ *
47
+ * - a [d3-format][1] string for numeric scales
48
+ * - a [d3-time-format][2] string for temporal scales
49
+ *
50
+ * [1]: https://d3js.org/d3-time
51
+ * [2]: https://d3js.org/d3-time-format
52
+ */
53
+ tickFormat?: string | null | ParamRef;
54
+ /**
55
+ * The rotation angle of axis tick labels in degrees clocksize; defaults to 0.
56
+ */
57
+ tickRotate?: number | ParamRef;
58
+ /**
59
+ * A textual label to show on the axis or legend; if null, show no label. By
60
+ * default the scale label is inferred from channel definitions, possibly with
61
+ * an arrow (↑, →, ↓, or ←) to indicate the direction of increasing value.
62
+ *
63
+ * For axes and legends only.
64
+ */
65
+ label?: string | null | ParamRef;
66
+ /**
67
+ * Where to place the axis **label** relative to the plot’s frame. For
68
+ * vertical position scales (*y* and *fy*), may be *top*, *bottom*, or
69
+ * *center*; for horizontal position scales (*x* and *fx*), may be *left*,
70
+ * *right*, or *center*. Defaults to *center* for ordinal scales (including
71
+ * *fx* and *fy*), and otherwise *top* for *y*, and *right* for *x*.
72
+ */
73
+ labelAnchor?: 'top' | 'right' | 'bottom' | 'left' | 'center' | ParamRef;
74
+ /**
75
+ * The axis **label** position offset (in pixels); default depends on margins
76
+ * and orientation.
77
+ */
78
+ labelOffset?: number | ParamRef;
79
+ /**
80
+ * Whether to apply a directional arrow such as → or ↑ to the scale label. If
81
+ * *auto* (the default), the presence of the arrow depends on whether the
82
+ * scale is ordinal.
83
+ */
84
+ labelArrow?: 'auto' | 'up' | 'right' | 'down' | 'left' | 'none' | true | false | null | ParamRef;
85
+ }
86
+ /** The subset of scale options for grids. */
87
+ type GridScaleOptions = Pick<ScaleOptions, 'interval' | 'ticks' | 'tickSpacing'>;
88
+ /** The subset of scale options for axes. */
89
+ type AxisScaleOptions = Pick<ScaleOptions, 'tickSize' | 'tickPadding' | 'tickFormat' | 'tickRotate' | 'label' | 'labelOffset' | 'labelAnchor' | 'labelArrow'>;
90
+ /** Options for the grid marks. */
91
+ export interface GridOptions extends GridScaleOptions {
92
+ /**
93
+ * The side of the frame on which to place the axis: *top* or *bottom* for
94
+ * horizontal axes (axisX and axisFx) and their associated vertical grids
95
+ * (gridX and gridFx), or *left* or *right* for vertical axes (axisY and
96
+ * axisFY) and their associated horizontal grids (gridY and gridFy).
97
+ *
98
+ * The default **anchor** depends on the associated scale:
99
+ *
100
+ * - *x* - *bottom*
101
+ * - *y* - *left*
102
+ * - *fx* - *top* if there is a *bottom* *x* axis, and otherwise *bottom*
103
+ * - *fy* - *right* if there is a *left* *y* axis, and otherwise *right*
104
+ *
105
+ * For grids, the **anchor** also affects the extent of grid lines when the
106
+ * opposite dimension is specified (**x** for gridY and **y** for gridX).
107
+ */
108
+ anchor?: 'top' | 'right' | 'bottom' | 'left' | ParamRef;
109
+ /**
110
+ * A shorthand for setting both **fill** and **stroke**; affects the stroke of
111
+ * tick vectors and grid rules, and the fill of tick texts and axis label
112
+ * texts; defaults to *currentColor*.
113
+ */
114
+ color?: MarkOptions['stroke'];
115
+ /**
116
+ * A shorthand for setting both **fillOpacity** and **strokeOpacity**; affects
117
+ * the stroke opacity of tick vectors and grid rules, and the fill opacity of
118
+ * tick texts and axis label texts; defaults to 1 for axes and 0.1 for grids.
119
+ */
120
+ opacity?: MarkOptions['opacity'];
121
+ }
122
+ /** Options for the axis marks. */
123
+ export interface AxisOptions extends GridOptions, MarkOptions, TextOptions, AxisScaleOptions {
124
+ /** The tick text **stroke**, say for a *white* outline to improve legibility; defaults to null. */
125
+ textStroke?: MarkOptions['stroke'];
126
+ /** The tick text **strokeOpacity**; defaults to 1; has no effect unless **textStroke** is set. */
127
+ textStrokeOpacity?: MarkOptions['strokeOpacity'];
128
+ /** The tick text **strokeWidth**; defaults to 4; has no effect unless **textStroke** is set. */
129
+ textStrokeWidth?: MarkOptions['strokeWidth'];
130
+ }
131
+ /** Options for the axisX and axisFx marks. */
132
+ export interface AxisXOptions extends AxisOptions, Omit<TickXOptions, 'data'> {
133
+ }
134
+ /** Options for the axisY and axisFy marks. */
135
+ export interface AxisYOptions extends AxisOptions, Omit<TickYOptions, 'data'> {
136
+ }
137
+ /** Options for the gridX and gridFx marks. */
138
+ export interface GridXOptions extends GridOptions, Omit<RuleXOptions, 'data' | 'interval'> {
139
+ }
140
+ /** Options for the gridY and gridFy marks. */
141
+ export interface GridYOptions extends GridOptions, Omit<RuleYOptions, 'data' | 'interval'> {
142
+ }
143
+ /** The axisX mark. */
144
+ export interface AxisX extends AxisXOptions {
145
+ /**
146
+ * An axis mark to document the visual encoding of the horizontal position
147
+ * *x* scale, comprised of (up to) three marks: a vector for ticks, a text
148
+ * for tick labels, and another text for an axis label. The data defaults to
149
+ * tick values sampled from the *x* scale’s domain; if desired, use one of
150
+ * the **ticks**, **tickSpacing**, or **interval** options.
151
+ *
152
+ * The **facetAnchor** option defaults to *bottom-empty* if **anchor** is
153
+ * *bottom*, and *top-empty* if **anchor** is *top*. The default margins
154
+ * likewise depend on **anchor** as follows; in order of **marginTop**,
155
+ * **marginRight**, **marginBottom**, and **marginLeft**, in pixels:
156
+ *
157
+ * - *top* - 30, 20, 0, 20
158
+ * - *bottom* - 0, 20, 30, 20
159
+ *
160
+ * For simplicity, and for consistent layout across plots, default axis margins
161
+ * are not affected by tick labels. If tick labels are too long, either increase
162
+ * the margin or shorten the labels: use the *k* SI-prefix tick format; use the
163
+ * **transform** *y*-scale option to show thousands or millions; or use the
164
+ * **textOverflow** and **lineWidth** options to clip.
165
+ */
166
+ mark: 'axisX';
167
+ }
168
+ /** The axisFx mark. */
169
+ export interface AxisFx extends AxisXOptions {
170
+ /**
171
+ * An axis mark to document the visual encoding of the horizontal facet
172
+ * position *fx* scale, comprised of (up to) three marks: a vector for ticks,
173
+ * a text for tick labels, and another text for an axis label. The data
174
+ * defaults to the *fx* scale’s domain; if desired, use one of the **ticks**,
175
+ * **tickSpacing**, or **interval** options.
176
+ *
177
+ * The **facetAnchor** and **frameAnchor** options defaults to **anchor**. The
178
+ * default margins likewise depend on **anchor** as follows; in order of
179
+ * **marginTop**, **marginRight**, **marginBottom**, and **marginLeft**, in
180
+ * pixels:
181
+ *
182
+ * - *top* - 30, 20, 0, 20
183
+ * - *bottom* - 0, 20, 30, 20
184
+ *
185
+ * For simplicity, and for consistent layout across plots, default axis margins
186
+ * are not affected by tick labels. If tick labels are too long, either increase
187
+ * the margin or shorten the labels: use the *k* SI-prefix tick format; use the
188
+ * **transform** *y*-scale option to show thousands or millions; or use the
189
+ * **textOverflow** and **lineWidth** options to clip.
190
+ */
191
+ mark: 'axisFx';
192
+ }
193
+ /** The axisY mark. */
194
+ export interface AxisY extends AxisYOptions {
195
+ /**
196
+ * An axis mark to document the visual encoding of the vertical position *y*
197
+ * scale, comprised of (up to) three marks: a vector for ticks, a text for
198
+ * tick labels, and another text for an axis label. The data defaults to tick
199
+ * values sampled from the *y* scale’s domain; if desired, use one of the
200
+ * **ticks**, **tickSpacing**, or **interval** options.
201
+ *
202
+ * The **facetAnchor** option defaults to *right-empty* if **anchor** is
203
+ * *right*, and *left-empty* if **anchor** is *left*. The default margins
204
+ * likewise depend on **anchor** as follows; in order of **marginTop**,
205
+ * **marginRight**, **marginBottom**, and **marginLeft**, in pixels:
206
+ *
207
+ * - *right* - 20, 40, 20, 0
208
+ * - *left* - 20, 0, 20, 40
209
+ *
210
+ * For simplicity, and for consistent layout across plots, default axis
211
+ * margins are not affected by tick labels. If tick labels are too long,
212
+ * either increase the margin or shorten the labels: use the *k* SI-prefix
213
+ * tick format; or use the **textOverflow** and **lineWidth** options to
214
+ * clip.
215
+ */
216
+ mark: 'axisY';
217
+ }
218
+ /** The axisFy mark. */
219
+ export interface AxisFy extends AxisYOptions {
220
+ /**
221
+ * An axis mark to document the visual encoding of the vertical facet
222
+ * position *fy* scale, comprised of (up to) three marks: a vector for ticks,
223
+ * a text for tick labels, and another text for an axis label. The data
224
+ * defaults to the *fy* scale’s domain; if desired, use one of the **ticks**,
225
+ * **tickSpacing**, or **interval** options.
226
+ *
227
+ * The **facetAnchor** option defaults to *right-empty* if **anchor** is
228
+ * *right*, and *left-empty* if **anchor** is *left*. The default margins
229
+ * likewise depend on **anchor** as follows; in order of **marginTop**,
230
+ * **marginRight**, **marginBottom**, and **marginLeft**, in pixels:
231
+ *
232
+ * - *right* - 20, 40, 20, 0
233
+ * - *left* - 20, 0, 20, 40
234
+ *
235
+ * For simplicity, and for consistent layout across plots, default axis
236
+ * margins are not affected by tick labels. If tick labels are too long,
237
+ * either increase the margin or shorten the labels: use the *k* SI-prefix
238
+ * tick format; or use the **textOverflow** and **lineWidth** options to
239
+ * clip.
240
+ */
241
+ mark: 'axisFy';
242
+ }
243
+ /** The gridX mark. */
244
+ export interface GridX extends GridXOptions {
245
+ /**
246
+ * A horizontally-positioned ruleX mark (a vertical line, |) that renders a
247
+ * grid for the *x* scale. The data defaults to tick values sampled from the
248
+ * *x* scale’s domain; if desired, use one of the **ticks**, **tickSpacing**,
249
+ * or **interval** options.
250
+ */
251
+ mark: 'gridX';
252
+ }
253
+ /** The gridFx mark. */
254
+ export interface GridFx extends GridXOptions {
255
+ /**
256
+ * A horizontally-positioned ruleX mark (a vertical line, |) that renders a
257
+ * grid for the *fx* scale. The data defaults to the *fx* scale’s domain;
258
+ * if desired, use the **ticks** option.
259
+ */
260
+ mark: 'gridFx';
261
+ }
262
+ /** The gridY mark. */
263
+ export interface GridY extends GridYOptions {
264
+ /**
265
+ * A vertically-positioned ruleY mark (a horizontal line, —) that renders a
266
+ * grid for the *y* scale. The data defaults to tick values sampled from the
267
+ * *y* scale’s domain; if desired, use one of the **ticks**, **tickSpacing**,
268
+ * or **interval** options.
269
+ */
270
+ mark: 'gridY';
271
+ }
272
+ /** The gridFy mark. */
273
+ export interface GridFy extends GridYOptions {
274
+ /**
275
+ * A vertically-positioned ruleY mark (a horizontal line, —) that renders a
276
+ * grid for the *fy* scale. The data defaults to the *fy* scale’s domain;
277
+ * if desired, use the **ticks** option.
278
+ */
279
+ mark: 'gridFy';
280
+ }
281
+ export {};
282
+ //# sourceMappingURL=Axis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Axis.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,151 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { Interval } from '../PlotTypes.js';
3
+ import { ChannelValueIntervalSpec, ChannelValueSpec, InsetOptions, MarkData, MarkOptions, StackOptions } from './Marks.js';
4
+ import { RectCornerOptions } from './Rect.js';
5
+ /** Options for the barX and barY marks. */
6
+ interface BarOptions extends MarkOptions, InsetOptions, RectCornerOptions, StackOptions {
7
+ /**
8
+ * How to convert a continuous value (**x** for barX, or **y** for barY) into
9
+ * an interval (**x1** and **x2** for barX, or **y1** and **y2** for barY);
10
+ * one of:
11
+ *
12
+ * - a named time interval such as *day* (for date intervals)
13
+ * - a number (for number intervals), defining intervals at integer multiples of *n*
14
+ *
15
+ * Setting this option disables the implicit stack transform (stackX for barX,
16
+ * or stackY for barY).
17
+ */
18
+ interval?: Interval | ParamRef;
19
+ }
20
+ /** Options for the barX mark. */
21
+ export interface BarXOptions extends BarOptions {
22
+ /**
23
+ * The horizontal position (or length/width) channel, typically bound to the
24
+ * *x* scale.
25
+ *
26
+ * If neither **x1** nor **x2** nor **interval** is specified, an implicit
27
+ * stackX transform is applied and **x** defaults to the identity function,
28
+ * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise if an **interval**
29
+ * is specified, then **x1** and **x2** are derived from **x**, representing
30
+ * the lower and upper bound of the containing interval, respectively.
31
+ * Otherwise, if only one of **x1** or **x2** is specified, the other
32
+ * defaults to **x**, which defaults to zero.
33
+ */
34
+ x?: ChannelValueIntervalSpec;
35
+ /**
36
+ * The required primary (starting, often left) horizontal position channel,
37
+ * typically bound to the *x* scale. Setting this option disables the
38
+ * implicit stackX transform.
39
+ *
40
+ * If *x* represents ordinal values, use a cell mark instead.
41
+ */
42
+ x1?: ChannelValueSpec;
43
+ /**
44
+ * The required secondary (ending, often right) horizontal position channel,
45
+ * typically bound to the *x* scale. Setting this option disables the
46
+ * implicit stackX transform.
47
+ *
48
+ * If *x* represents ordinal values, use a cell mark instead.
49
+ */
50
+ x2?: ChannelValueSpec;
51
+ /**
52
+ * The optional vertical position of the bar; a ordinal channel typically
53
+ * bound to the *y* scale. If not specified, the bar spans the vertical
54
+ * extent of the frame; otherwise the *y* scale must be a *band* scale.
55
+ *
56
+ * If *y* represents quantitative or temporal values, use a rectX mark
57
+ * instead.
58
+ */
59
+ y?: ChannelValueSpec;
60
+ }
61
+ /** Options for the barY mark. */
62
+ export interface BarYOptions extends BarOptions {
63
+ /**
64
+ * The vertical position (or length/height) channel, typically bound to the
65
+ * *y* scale.
66
+ *
67
+ * If neither **y1** nor **y2** nor **interval** is specified, an implicit
68
+ * stackY transform is applied and **y** defaults to the identity function,
69
+ * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise if an **interval**
70
+ * is specified, then **y1** and **y2** are derived from **y**, representing
71
+ * the lower and upper bound of the containing interval, respectively.
72
+ * Otherwise, if only one of **y1** or **y2** is specified, the other
73
+ * defaults to **y**, which defaults to zero.
74
+ */
75
+ y?: ChannelValueIntervalSpec;
76
+ /**
77
+ * The required primary (starting, often bottom) vertical position channel,
78
+ * typically bound to the *y* scale. Setting this option disables the
79
+ * implicit stackY transform.
80
+ *
81
+ * If *y* represents ordinal values, use a cell mark instead.
82
+ */
83
+ y1?: ChannelValueSpec;
84
+ /**
85
+ * The required secondary (ending, often top) horizontal position channel,
86
+ * typically bound to the *y* scale. Setting this option disables the
87
+ * implicit stackY transform.
88
+ *
89
+ * If *y* represents ordinal values, use a cell mark instead.
90
+ */
91
+ y2?: ChannelValueSpec;
92
+ /**
93
+ * The optional horizontal position of the bar; a ordinal channel typically
94
+ * bound to the *x* scale. If not specified, the bar spans the horizontal
95
+ * extent of the frame; otherwise the *x* scale must be a *band* scale.
96
+ *
97
+ * If *x* represents quantitative or temporal values, use a rectY mark
98
+ * instead.
99
+ */
100
+ x?: ChannelValueSpec;
101
+ }
102
+ /** The barX mark. */
103
+ export interface BarX extends MarkData, BarXOptions {
104
+ /**
105
+ * A horizontal bar mark. The required *x* values should be quantitative or
106
+ * temporal, and the optional *y* values should be ordinal.
107
+ *
108
+ * If neither **x1** nor **x2** nor **interval** is specified, an implicit
109
+ * stackX transform is applied and **x** defaults to the identity function,
110
+ * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise if an **interval**
111
+ * is specified, then **x1** and **x2** are derived from **x**, representing
112
+ * the lower and upper bound of the containing interval, respectively.
113
+ * Otherwise, if only one of **x1** or **x2** is specified, the other
114
+ * defaults to **x**, which defaults to zero.
115
+ *
116
+ * The optional **y** ordinal channel specifies the vertical position; it is
117
+ * typically bound to the *y* scale, which must be a *band* scale. If the
118
+ * **y** channel is not specified, the bar will span the vertical extent of
119
+ * the plot’s frame.
120
+ *
121
+ * If *y* is quantitative, use the rectX mark instead.
122
+ * If *x* is ordinal, use the cell mark instead.
123
+ */
124
+ mark: 'barX';
125
+ }
126
+ /** The barY mark. */
127
+ export interface BarY extends MarkData, BarYOptions {
128
+ /**
129
+ * A vertical bar mark. The required *y* values should be quantitative or
130
+ * temporal, and the optional *x* values should be ordinal.
131
+ *
132
+ * If neither **y1** nor **y2** nor **interval** is specified, an implicit
133
+ * stackY transform is applied and **y** defaults to the identity function,
134
+ * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise if an **interval**
135
+ * is specified, then **y1** and **y2** are derived from **y**, representing
136
+ * the lower and upper bound of the containing interval, respectively.
137
+ * Otherwise, if only one of **y1** or **y2** is specified, the other
138
+ * defaults to **y**, which defaults to zero.
139
+ *
140
+ * The optional **x** ordinal channel specifies the horizontal position; it
141
+ * is typically bound to the *x* scale, which must be a *band* scale. If the
142
+ * **x** channel is not specified, the bar will span the horizontal extent of
143
+ * the plot’s frame.
144
+ *
145
+ * If *x* is quantitative, use the rectY mark instead.
146
+ * If *y* is ordinal, use the cell mark instead.
147
+ */
148
+ mark: 'barY';
149
+ }
150
+ export {};
151
+ //# sourceMappingURL=Bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3H,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,2CAA2C;AAC3C,UAAU,UAAW,SAAQ,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY;IACrF;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAChC;AAED,iCAAiC;AACjC,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C;;;;;;;;;;;OAWG;IACH,CAAC,CAAC,EAAE,wBAAwB,CAAC;IAE7B;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC;IAEtB;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC;IAEtB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;CACtB;AAED,iCAAiC;AACjC,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C;;;;;;;;;;;OAWG;IACH,CAAC,CAAC,EAAE,wBAAwB,CAAC;IAE7B;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC;IAEtB;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC;IAEtB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;CACtB;AAED,qBAAqB;AACrB,MAAM,WAAW,IAAK,SAAQ,QAAQ,EAAE,WAAW;IACjD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAqB;AACrB,MAAM,WAAW,IAAK,SAAQ,QAAQ,EAAE,WAAW;IACjD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,58 @@
1
+ import { ChannelValueSpec, InsetOptions, MarkData, MarkOptions } from './Marks.js';
2
+ import { RectCornerOptions } from './Rect.js';
3
+ /** Options for the cell mark. */
4
+ export interface CellOptions extends MarkOptions, InsetOptions, RectCornerOptions {
5
+ /**
6
+ * The horizontal position of the cell; an optional ordinal channel typically
7
+ * bound to the *x* scale. If not specified, the cell spans the horizontal
8
+ * extent of the frame; otherwise the *x* scale must be a *band* scale.
9
+ *
10
+ * If *x* represents quantitative or temporal values, use a barX mark instead;
11
+ * if *y* is also quantitative or temporal, use a rect mark.
12
+ */
13
+ x?: ChannelValueSpec;
14
+ /**
15
+ * The vertical position of the cell; an optional ordinal channel typically
16
+ * bound to the *y* scale. If not specified, the cell spans the vertical
17
+ * extent of the frame; otherwise the *y* scale must be a *band* scale.
18
+ *
19
+ * If *y* represents quantitative or temporal values, use a barY mark instead;
20
+ * if *x* is also quantitative or temporal, use a rect mark.
21
+ */
22
+ y?: ChannelValueSpec;
23
+ }
24
+ /** The cell mark. */
25
+ export interface Cell extends MarkData, CellOptions {
26
+ /**
27
+ * A rectangular cell mark. Along with **x** and/or **y**, a **fill** channel
28
+ * is typically specified to encode value as color.
29
+ *
30
+ * If neither **x** nor **y** are specified, *data* is assumed to be an array of
31
+ * pairs [[*x₀*, *y₀*], [*x₁*, *y₁*], [*x₂*, *y₂*], …] such that **x** = [*x₀*,
32
+ * *x₁*, *x₂*, …] and **y** = [*y₀*, *y₁*, *y₂*, …].
33
+ *
34
+ * Both **x** and **y** should be ordinal; if only **x** is quantitative (or
35
+ * temporal), use a barX mark; if only **y** is quantitative, use a barY mark;
36
+ * if both are quantitative, use a rect mark.
37
+ */
38
+ mark: 'cell';
39
+ }
40
+ /** The cellX mark. */
41
+ export interface CellX extends MarkData, CellOptions {
42
+ /**
43
+ * Like cell, but **x** defaults to the zero-based index [0, 1, 2, …], and if
44
+ * **stroke** is not a channel, **fill** defaults to the identity function,
45
+ * assuming that *data* = [*x₀*, *x₁*, *x₂*, …].
46
+ */
47
+ mark: 'cellX';
48
+ }
49
+ /** The cellY mark. */
50
+ export interface CellY extends MarkData, CellOptions {
51
+ /**
52
+ * Like cell, but **y** defaults to the zero-based index [0, 1, 2, …], and if
53
+ * **stroke** is not a channel, **fill** defaults to the identity function,
54
+ * assuming that *data* = [*y₀*, *y₁*, *y₂*, …].
55
+ */
56
+ mark: 'cellY';
57
+ }
58
+ //# sourceMappingURL=Cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,iCAAiC;AACjC,MAAM,WAAW,WAAY,SAAQ,WAAW,EAAE,YAAY,EAAE,iBAAiB;IAC/E;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;CACtB;AAED,qBAAqB;AACrB,MAAM,WAAW,IAAK,SAAQ,QAAQ,EAAE,WAAW;IACjD;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sBAAsB;AACtB,MAAM,WAAW,KAAM,SAAQ,QAAQ,EAAE,WAAW;IAClD;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,sBAAsB;AACtB,MAAM,WAAW,KAAM,SAAQ,QAAQ,EAAE,WAAW;IAClD;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf"}
@@ -0,0 +1,24 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { MarkData, MarkOptions } from './Marks.js';
3
+ import { Grid2DOptions } from './Raster.js';
4
+ export interface ContourOptions extends MarkOptions, Grid2DOptions {
5
+ /**
6
+ * The number of contour thresholds to subdivide the domain into discrete
7
+ * level sets; defaults to 10. One of:
8
+ *
9
+ * - a count representing the desired number of bins
10
+ * - an array of *n* threshold values for *n* - 1 bins
11
+ */
12
+ thresholds?: number | number[] | ParamRef;
13
+ }
14
+ /** The contour mark. */
15
+ export interface Contour extends MarkData, ContourOptions {
16
+ /**
17
+ * A contour mark that draws isolines to delineate regions above and below a
18
+ * particular continuous value. It is often used to convey densities as a
19
+ * height field. The special column name "density" can be used to map density
20
+ * values to the fill or stroke options.
21
+ */
22
+ mark: 'contour';
23
+ }
24
+ //# sourceMappingURL=Contour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contour.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Contour.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,cAAe,SAAQ,WAAW,EAAE,aAAa;IAChE;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAC;CAC3C;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,cAAc;IACvD;;;;;OAKG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB"}
@@ -0,0 +1,87 @@
1
+ import { ChannelValue, ChannelValueSpec, CurveOptions, MarkData, MarkOptions, MarkerOptions } from './Marks.js';
2
+ /** Options for the Delaunay marks. */
3
+ export interface DelaunayOptions extends MarkOptions, MarkerOptions, CurveOptions {
4
+ /** The horizontal position channel, typically bound to the *x* scale. */
5
+ x?: ChannelValueSpec;
6
+ /** The vertical position channel, typically bound to the *y* scale. */
7
+ y?: ChannelValueSpec;
8
+ /**
9
+ * An optional ordinal channel for grouping to produce multiple
10
+ * (possibly overlapping) triangulations.
11
+ */
12
+ z?: ChannelValue;
13
+ }
14
+ /** The delaunayLink mark. */
15
+ export interface DelaunayLink extends MarkData, DelaunayOptions {
16
+ /**
17
+ * A mark that draws links for each edge of the Delaunay triangulation
18
+ * of points given by the **x** and **y** channels. Like the link mark,
19
+ * except that **x1**, **y1**, **x2**, and **y2** are derived automatically
20
+ * from **x** and **y**. When an aesthetic channel is specified (such as
21
+ * **stroke** or **strokeWidth**), the link inherits the corresponding
22
+ * channel value from one of its two endpoints arbitrarily.
23
+ *
24
+ * If **z** is specified, the input points are grouped by *z*, producing a
25
+ * separate Delaunay triangulation for each group.
26
+ */
27
+ mark: 'delaunayLink';
28
+ }
29
+ /** The delaunayMesh mark. */
30
+ export interface DelaunayMesh extends MarkData, DelaunayOptions {
31
+ /**
32
+ * A mark that draws a mesh of the Delaunay triangulation of the points
33
+ * given by the **x** and **y** channels. The **stroke** option defaults to
34
+ * _currentColor_, and the **strokeOpacity** defaults to 0.2; the **fill**
35
+ * option is not supported. When an aesthetic channel is specified (such as
36
+ * **stroke** or **strokeWidth**), the mesh inherits the corresponding
37
+ * channel value from one of its constituent points arbitrarily.
38
+ *
39
+ * If **z** is specified, the input points are grouped by *z*, producing a
40
+ * separate Delaunay triangulation for each group.
41
+ */
42
+ mark: 'delaunayMesh';
43
+ }
44
+ /** The hull mark. */
45
+ export interface Hull extends MarkData, DelaunayOptions {
46
+ /**
47
+ * A mark that draws a convex hull around the points given by the **x** and
48
+ * **y** channels. The **stroke** option defaults to _currentColor_ and the
49
+ * **fill** option defaults to _none_. When an aesthetic channel is specified
50
+ * (such as **stroke** or **strokeWidth**), the hull inherits the
51
+ * corresponding channel value from one of its constituent points
52
+ * arbitrarily.
53
+ *
54
+ * If **z** is specified, the input points are grouped by *z*, producing a
55
+ * separate hull for each group. If **z** is not specified, it defaults to
56
+ * the **fill** channel, if any, or the **stroke** channel, if any.
57
+ */
58
+ mark: 'hull';
59
+ }
60
+ /** The voronoi mark. */
61
+ export interface Voronoi extends MarkData, DelaunayOptions {
62
+ /**
63
+ * A mark that draws polygons for each cell of the Voronoi tesselation
64
+ * of the points given by the **x** and **y** channels.
65
+ *
66
+ * If **z** is specified, the input points are grouped by *z*, producing a
67
+ * separate Voronoi tesselation for each group.
68
+ */
69
+ mark: 'voronoi';
70
+ }
71
+ /** The voronoiMesh mark. */
72
+ export interface VoronoiMesh extends MarkData, DelaunayOptions {
73
+ /**
74
+ * A mark that draws a mesh for the cell boundaries of the Voronoi
75
+ * tesselation of the points given by the **x** and **y** channels. The
76
+ * **stroke** option defaults to _currentColor_, and the **strokeOpacity**
77
+ * defaults to 0.2. The **fill** option is not supported. When an aesthetic
78
+ * channel is specified (such as **stroke** or **strokeWidth**), the mesh
79
+ * inherits the corresponding channel value from one of its constituent
80
+ * points arbitrarily.
81
+ *
82
+ * If **z** is specified, the input points are grouped by *z*, producing a
83
+ * separate Voronoi tesselation for each group.
84
+ */
85
+ mark: 'voronoiMesh';
86
+ }
87
+ //# sourceMappingURL=Delaunay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Delaunay.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Delaunay.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAC5C,QAAQ,EAAE,WAAW,EAAE,aAAa,EACrC,MAAM,YAAY,CAAC;AAEpB,sCAAsC;AACtC,MAAM,WAAW,eAAgB,SAAQ,WAAW,EAAE,aAAa,EAAE,YAAY;IAC/E,yEAAyE;IACzE,CAAC,CAAC,EAAE,gBAAgB,CAAC;IACrB,uEAAuE;IACvE,CAAC,CAAC,EAAE,gBAAgB,CAAC;IACrB;;;OAGG;IACH,CAAC,CAAC,EAAE,YAAY,CAAC;CAClB;AAED,6BAA6B;AAC7B,MAAM,WAAW,YAAa,SAAQ,QAAQ,EAAE,eAAe;IAC7D;;;;;;;;;;OAUG;IACH,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,6BAA6B;AAC7B,MAAM,WAAW,YAAa,SAAQ,QAAQ,EAAE,eAAe;IAC7D;;;;;;;;;;OAUG;IACH,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,qBAAqB;AACrB,MAAM,WAAW,IAAK,SAAQ,QAAQ,EAAE,eAAe;IACrD;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,eAAe;IACxD;;;;;;OAMG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,4BAA4B;AAC5B,MAAM,WAAW,WAAY,SAAQ,QAAQ,EAAE,eAAe;IAC5D;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB"}
@@ -0,0 +1,28 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { ChannelValue, MarkData } from './Marks.js';
3
+ import { RasterOptions } from './Raster.js';
4
+ export interface DenseLineOptions extends RasterOptions {
5
+ /**
6
+ * Flag to perform approximate arc length normalization of line segments
7
+ * to prevent artifacts due to overcounting steep lines. Defaults to `true`.
8
+ */
9
+ normalize?: boolean | ParamRef;
10
+ /**
11
+ * A ordinal channel for grouping data into series to be drawn as separate
12
+ * lines.
13
+ */
14
+ z?: ChannelValue;
15
+ }
16
+ /** The denseLine mark. */
17
+ export interface DenseLine extends MarkData, DenseLineOptions {
18
+ /**
19
+ * A denseLine mark that plots line densities rather than point densities.
20
+ * The mark forms a binned raster grid and "draws" straight lines into it.
21
+ * To avoid over-weighting steep lines, by default each drawn series is
22
+ * normalized on a per-column basis to approximate arc length normalization.
23
+ * The values for each series are aggregated to form the line density, which
24
+ * is then drawn as an image similar to the raster mark.
25
+ */
26
+ mark: 'denseLine';
27
+ }
28
+ //# sourceMappingURL=DenseLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DenseLine.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/DenseLine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE/B;;;OAGG;IACH,CAAC,CAAC,EAAE,YAAY,CAAC;CAClB;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAU,SAAQ,QAAQ,EAAE,gBAAgB;IAC3D;;;;;;;OAOG;IACH,IAAI,EAAE,WAAW,CAAC;CACnB"}