@uwdata/mosaic-spec 0.17.0 → 0.18.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 (182) hide show
  1. package/LICENSE +47 -0
  2. package/README.md +1 -1
  3. package/dist/mosaic-schema.json +201085 -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 +213 -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/tsconfig.json +0 -13
  182. package/vitest.config.ts +0 -3
@@ -0,0 +1,137 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { AreaXOptions, AreaYOptions } from './Area.js';
3
+ import { DotOptions } from './Dot.js';
4
+ import { LineXOptions, LineYOptions } from './Line.js';
5
+ import { MarkData, MarkOptions, TextStyles } from './Marks.js';
6
+ import { Grid2DOptions } from './Raster.js';
7
+ import { TextOptions } from './Text.js';
8
+ export interface Density2DOptions extends MarkOptions, Omit<DotOptions, 'x' | 'y'>, TextStyles, Grid2DOptions {
9
+ /**
10
+ * The basic mark type to use to render 2D density values.
11
+ * Defaults to a dot mark; cell and text marks are also supported.
12
+ */
13
+ type?: 'dot' | 'circle' | 'hexagon' | 'cell' | 'text' | ParamRef;
14
+ }
15
+ /** The density mark for 2D densities. */
16
+ export interface Density extends MarkData, Density2DOptions {
17
+ /**
18
+ * A 2D density mark that shows smoothed point cloud densities along two
19
+ * dimensions. The mark bins the data, counts the number of records that fall
20
+ * into each bin, and smooths the resulting counts, then plots the smoothed
21
+ * distribution, by default using a circular dot mark. The density mark
22
+ * calculates density values that can be mapped to encoding channels such as
23
+ * fill or r using the special field name "density".
24
+ *
25
+ * Set the *type* property to use a different base mark type.
26
+ */
27
+ mark: 'density';
28
+ }
29
+ export interface Density1DOptions {
30
+ /**
31
+ * The kernel density bandwidth for smoothing, in pixels. Defaults to 20.
32
+ */
33
+ bandwidth?: number | ParamRef;
34
+ /**
35
+ * The number of bins over which to discretize the data prior to smoothing.
36
+ * Defaults to 1024.
37
+ */
38
+ bins?: number | ParamRef;
39
+ /**
40
+ * Normalization method for density estimates. If `false` or `'none'` (the
41
+ * default), the density estimates are smoothed weighted counts. If `true`
42
+ * or `'sum'`, density estimates are divided by the sum of the total point
43
+ * mass. If `'max'`, estimates are divided by the maximum smoothed value.
44
+ */
45
+ normalize?: boolean | 'max' | 'sum' | 'none' | ParamRef;
46
+ }
47
+ export interface DensityAreaXOptions extends Omit<AreaXOptions, 'x' | 'x1' | 'x2'> {
48
+ /**
49
+ * The basic mark type to use to render 1D density values. Defaults to an
50
+ * areaX mark; lineX, dotX, and textX marks are also supported.
51
+ */
52
+ type: 'areaX';
53
+ /**
54
+ * Flag indicating if densities should be stacked. Defaults to false.
55
+ */
56
+ stack?: boolean | ParamRef;
57
+ }
58
+ export interface DensityAreaYOptions extends Omit<AreaYOptions, 'y' | 'y1' | 'y2'> {
59
+ /**
60
+ * The basic mark type to use to render 1D density values. Defaults to an
61
+ * areaY mark; lineY, dot, and text marks are also supported.
62
+ */
63
+ type?: 'areaY';
64
+ /**
65
+ * Flag indicating if densities should be stacked. Defaults to false.
66
+ */
67
+ stack?: boolean | ParamRef;
68
+ }
69
+ export interface DensityLineXOptions extends Omit<LineXOptions, 'x' | 'x1' | 'x2'> {
70
+ /**
71
+ * The basic mark type to use to render 1D density values. Defaults to an
72
+ * areaX mark; lineX, dotX, and textX marks are also supported.
73
+ */
74
+ type: 'lineX';
75
+ }
76
+ export interface DensityLineYOptions extends Omit<LineYOptions, 'y' | 'y1' | 'y2'> {
77
+ /**
78
+ * The basic mark type to use to render 1D density values. Defaults to an
79
+ * areaY mark; lineY, dot, and text marks are also supported.
80
+ */
81
+ type: 'lineY';
82
+ }
83
+ export interface DensityDotXOptions extends Omit<DotOptions, 'x'> {
84
+ /**
85
+ * The basic mark type to use to render 1D density values. Defaults to an
86
+ * areaX mark; lineX, dotX, and textX marks are also supported.
87
+ */
88
+ type: 'dotX';
89
+ }
90
+ export interface DensityDotYOptions extends Omit<DotOptions, 'y'> {
91
+ /**
92
+ * The basic mark type to use to render 1D density values. Defaults to an
93
+ * areaY mark; lineY, dot, and text marks are also supported.
94
+ */
95
+ type: 'dot' | 'dotY' | 'circle' | 'hexagon';
96
+ }
97
+ export interface DensityTextXOptions extends Omit<TextOptions, 'x'> {
98
+ /**
99
+ * The basic mark type to use to render 1D density values. Defaults to an
100
+ * areaX mark; lineX, dotX, and textX marks are also supported.
101
+ */
102
+ type: 'textX';
103
+ }
104
+ export interface DensityTextYOptions extends Omit<TextOptions, 'y'> {
105
+ /**
106
+ * The basic mark type to use to render 1D density values. Defaults to an
107
+ * areaY mark; lineY, dot, and text marks are also supported.
108
+ */
109
+ type: 'text' | 'textY';
110
+ }
111
+ export interface DensityXBase extends MarkData, Density1DOptions {
112
+ /**
113
+ * A densityX mark that visualizes smoothed point cloud densities along the
114
+ * **x** dimension. The mark bins the data, counts the number of records that
115
+ * fall into each bin, smooths the resulting counts, and then plots the
116
+ * smoothed distribution, by default using an areaX mark.
117
+ *
118
+ * Set the *type* property to use a different base mark type.
119
+ */
120
+ mark: 'densityX';
121
+ }
122
+ export interface DensityYBase extends MarkData, Density1DOptions {
123
+ /**
124
+ * A densityY mark that visualizes smoothed point cloud densities along the
125
+ * **y** dimension. The mark bins the data, counts the number of records that
126
+ * fall into each bin, smooths the resulting counts, and then plots the
127
+ * smoothed distribution, by default using an areaY mark.
128
+ *
129
+ * Set the *type* property to use a different base mark type.
130
+ */
131
+ mark: 'densityY';
132
+ }
133
+ /** The densityX mark. */
134
+ export type DensityX = DensityXBase & (DensityAreaXOptions | DensityLineXOptions | DensityDotXOptions | DensityTextXOptions);
135
+ /** The densityY mark. */
136
+ export type DensityY = DensityYBase & (DensityAreaYOptions | DensityLineYOptions | DensityDotYOptions | DensityTextYOptions);
137
+ //# sourceMappingURL=Density.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Density.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Density.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,134 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { FrameAnchor, Interval, SymbolType } from '../PlotTypes.js';
3
+ import { ChannelValue, ChannelValueIntervalSpec, ChannelValueSpec, MarkData, MarkOptions } from './Marks.js';
4
+ /** Options for the dot mark. */
5
+ export interface DotOptions extends MarkOptions {
6
+ /**
7
+ * The horizontal position channel specifying the dot’s center, typically
8
+ * bound to the *x* scale.
9
+ */
10
+ x?: ChannelValueSpec;
11
+ /**
12
+ * The vertical position channel specifying the dot’s center, typically bound
13
+ * to the *y* scale.
14
+ */
15
+ y?: ChannelValueSpec;
16
+ /**
17
+ * An optional ordinal channel for grouping data into series.
18
+ */
19
+ z?: ChannelValue;
20
+ /**
21
+ * The radius of dots; either a channel or constant. When a number, it is
22
+ * interpreted as a constant radius in pixels. Otherwise it is interpreted as
23
+ * a channel, typically bound to the *r* channel, which defaults to the *sqrt*
24
+ * type for proportional symbols. The radius defaults to 4.5 pixels when using
25
+ * the **symbol** channel, and otherwise 3 pixels. Dots with a nonpositive
26
+ * radius are not drawn.
27
+ */
28
+ r?: ChannelValueSpec | number | ParamRef;
29
+ /**
30
+ * The rotation angle of dots in degrees clockwise; either a channel or a
31
+ * constant. When a number, it is interpreted as a constant; otherwise it is
32
+ * interpreted as a channel. Defaults to 0°, pointing up.
33
+ */
34
+ rotate?: ChannelValue | number | ParamRef;
35
+ /**
36
+ * The categorical symbol; either a channel or a constant. A constant symbol
37
+ * can be specified by a valid symbol name such as *star*, or a symbol object
38
+ * (implementing the draw method); otherwise it is interpreted as a channel.
39
+ * Defaults to *circle* for the **dot** mark, and *hexagon* for the
40
+ * **hexagon** mark.
41
+ *
42
+ * If the **symbol** channel’s values are all symbols, symbol names, or
43
+ * nullish, the channel is unscaled (values are interpreted literally);
44
+ * otherwise, the channel is bound to the *symbol* scale.
45
+ */
46
+ symbol?: ChannelValueSpec | SymbolType | ParamRef;
47
+ /**
48
+ * The frame anchor specifies defaults for **x** and **y** based on the plot’s
49
+ * frame; it may be one of the four sides (*top*, *right*, *bottom*, *left*),
50
+ * one of the four corners (*top-left*, *top-right*, *bottom-right*,
51
+ * *bottom-left*), or the *middle* of the frame. For example, for dots
52
+ * distributed horizontally at the top of the frame:
53
+ *
54
+ * ```js
55
+ * Plot.dot(data, {x: "date", frameAnchor: "top"})
56
+ * ```
57
+ */
58
+ frameAnchor?: FrameAnchor | ParamRef;
59
+ }
60
+ /** Options for the dotX mark. */
61
+ export interface DotXOptions extends Omit<DotOptions, "y"> {
62
+ /**
63
+ * The vertical position of the dot’s center, typically bound to the *y*
64
+ * scale.
65
+ */
66
+ y?: ChannelValueIntervalSpec;
67
+ /**
68
+ * An interval (such as *day* or a number), to transform **y** values to the
69
+ * middle of the interval.
70
+ */
71
+ interval?: Interval | ParamRef;
72
+ }
73
+ /** Options for the dotY mark. */
74
+ export interface DotYOptions extends Omit<DotOptions, "x"> {
75
+ /**
76
+ * The horizontal position of the dot’s center, typically bound to the *x*
77
+ * scale.
78
+ */
79
+ x?: ChannelValueIntervalSpec;
80
+ /**
81
+ * An interval (such as *day* or a number), to transform **x** values to the
82
+ * middle of the interval.
83
+ */
84
+ interval?: Interval | ParamRef;
85
+ }
86
+ /** The dot mark. */
87
+ export interface Dot extends MarkData, DotOptions {
88
+ /**
89
+ * A dot mark that draws circles, or other symbols, as in a scatterplot.
90
+ *
91
+ * If either **x** or **y** is not specified, the default is determined by the
92
+ * **frameAnchor** option. If none of **x**, **y**, and **frameAnchor** are
93
+ * specified, *data* is assumed to be an array of pairs [[*x₀*, *y₀*], [*x₁*,
94
+ * *y₁*], [*x₂*, *y₂*], …] such that **x** = [*x₀*, *x₁*, *x₂*, …] and **y** =
95
+ * [*y₀*, *y₁*, *y₂*, …].
96
+ *
97
+ * Dots are sorted by descending radius **r** by default to mitigate
98
+ * overplotting; set the **sort** option to null to draw them in input order.
99
+ */
100
+ mark: 'dot';
101
+ }
102
+ /** The dotX mark. */
103
+ export interface DotX extends MarkData, DotXOptions {
104
+ /**
105
+ * Like dot, except that **x** defaults to the identity function, assuming that
106
+ * *data* = [*x₀*, *x₁*, *x₂*, …].
107
+ *
108
+ * If an **interval** is specified, such as *day*, **y** is transformed to the
109
+ * middle of the interval.
110
+ */
111
+ mark: 'dotX';
112
+ }
113
+ /** The dotY mark. */
114
+ export interface DotY extends MarkData, DotYOptions {
115
+ /**
116
+ * Like dot, except that **y** defaults to the identity function, assuming that
117
+ * *data* = [*y₀*, *y₁*, *y₂*, …].
118
+ *
119
+ * If an **interval** is specified, such as *day*, **x** is transformed to the
120
+ * middle of the interval.
121
+ */
122
+ mark: 'dotY';
123
+ }
124
+ /** The circle mark. */
125
+ export interface Circle extends MarkData, Exclude<DotOptions, 'symbol'> {
126
+ /** Like dot, except that the **symbol** option is set to *circle*. */
127
+ mark: 'circle';
128
+ }
129
+ /** The hexagon mark. */
130
+ export interface Hexagon extends MarkData, Exclude<DotOptions, 'symbol'> {
131
+ /** Like dot, except that the **symbol** option is set to *hexagon*. */
132
+ mark: 'hexagon';
133
+ }
134
+ //# sourceMappingURL=Dot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dot.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Dot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,YAAY,EAAE,wBAAwB,EACtC,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EACxC,MAAM,YAAY,CAAC;AAEpB,gCAAgC;AAChC,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;OAEG;IACH,CAAC,CAAC,EAAE,YAAY,CAAC;IAEjB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEzC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;IAE1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC;IAElD;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CACtC;AAED,iCAAiC;AACjC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC;IACxD;;;OAGG;IACH,CAAC,CAAC,EAAE,wBAAwB,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAChC;AAED,iCAAiC;AACjC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC;IACxD;;;OAGG;IACH,CAAC,CAAC,EAAE,wBAAwB,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAChC;AAED,oBAAoB;AACpB,MAAM,WAAW,GAAI,SAAQ,QAAQ,EAAE,UAAU;IAC/C;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED,qBAAqB;AACrB,MAAM,WAAW,IAAK,SAAQ,QAAQ,EAAE,WAAW;IACjD;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAqB;AACrB,MAAM,WAAW,IAAK,SAAQ,QAAQ,EAAE,WAAW;IACjD;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,uBAAuB;AACvB,MAAM,WAAW,MAAO,SAAQ,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;IACrE,sEAAsE;IACtE,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtE,uEAAuE;IACvE,IAAI,EAAE,SAAS,CAAC;CACjB"}
@@ -0,0 +1,83 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { ChannelValue, ChannelValueSpec, MarkData, MarkOptions, MarkerOptions } from './Marks.js';
3
+ /** Options for errorbar marks. */
4
+ interface ErrorBarOptions extends MarkOptions, MarkerOptions {
5
+ /**
6
+ * The confidence interval in (0, 1); defaults to 0.95.
7
+ */
8
+ ci?: number | ParamRef;
9
+ /**
10
+ * An optional ordinal channel for grouping data, producing an independent
11
+ * error bar for each group. If not specified, it defaults to **stroke** if
12
+ * a channel.
13
+ */
14
+ z?: ChannelValue;
15
+ }
16
+ /** Options for the errorbarX mark. */
17
+ export interface ErrorBarXOptions extends ErrorBarOptions {
18
+ /**
19
+ * The dependent variable horizontal position channel, typically bound to the
20
+ * *x* scale.
21
+ */
22
+ x: ChannelValueSpec;
23
+ /**
24
+ * The independent variable vertical position channel, typically bound to
25
+ * the *y* scale; defaults to the zero-based index of the data [0, 1, 2, …].
26
+ */
27
+ y?: ChannelValueSpec;
28
+ }
29
+ /** The errorbarX mark. */
30
+ export interface ErrorBarX extends MarkData, ErrorBarXOptions {
31
+ /**
32
+ * A mark that draws error bars for a calculated parametric confidence
33
+ * interval for a dependent variable (*x*), potentially grouped by an
34
+ * independent variable (*y*).
35
+ *
36
+ * This mark aggregates raw values to produce a [parametric confidence
37
+ * interval][1] of the mean, assuming a normal distribution. To instead
38
+ * visualize pre-computeted interval values or custom aggregations, use
39
+ * a **ruleY** mark with specified **x1** and **x2** channels.
40
+ *
41
+ * Multiple error bars can be produced by specifying a **z** or **stroke**
42
+ * channel. Set the **marker** option to `'tick'` to add small perpendicular
43
+ * lines at the start and end of the error interval.
44
+ *
45
+ * [1]: https://en.wikipedia.org/wiki/Normal_distribution#Confidence_intervals
46
+ */
47
+ mark: 'errorbarX';
48
+ }
49
+ /** Options for the errorbarY mark. */
50
+ export interface ErrorBarYOptions extends ErrorBarOptions {
51
+ /**
52
+ * The independent variable horizontal position channel, typically bound to
53
+ * the *x* scale; defaults to the zero-based index of the data [0, 1, 2, …].
54
+ */
55
+ x?: ChannelValueSpec;
56
+ /**
57
+ * The dependent variable vertical position channel, typically bound to the
58
+ * *y* scale.
59
+ */
60
+ y: ChannelValueSpec;
61
+ }
62
+ /** The errorbarY mark. */
63
+ export interface ErrorBarY extends MarkData, ErrorBarYOptions {
64
+ /**
65
+ * A mark that draws error bars for a calculated parametric confidence
66
+ * interval for a dependent variable (*y*), potentially grouped by an
67
+ * independent variable (*x*).
68
+ *
69
+ * This mark aggregates raw values to produce a [parametric confidence
70
+ * interval][1] of the mean, assuming a normal distribution. To instead
71
+ * visualize pre-computeted interval values or custom aggregations, use
72
+ * a **ruleX** mark with specified **y1** and **y2** channels.
73
+ *
74
+ * Multiple error bars can be produced by specifying a **z** or **stroke**
75
+ * channel. Set the **marker** option to `'tick'` to add small perpendicular
76
+ * lines at the start and end of the error interval.
77
+ *
78
+ * [1]: https://en.wikipedia.org/wiki/Normal_distribution#Confidence_intervals
79
+ */
80
+ mark: 'errorbarY';
81
+ }
82
+ export {};
83
+ //# sourceMappingURL=ErrorBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBar.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/ErrorBar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EACrE,MAAM,YAAY,CAAC;AAEpB,kCAAkC;AAClC,UAAU,eAAgB,SAAQ,WAAW,EAAE,aAAa;IAC1D;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEvB;;;;OAIG;IACH,CAAC,CAAC,EAAE,YAAY,CAAC;CAClB;AAED,sCAAsC;AACtC,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD;;;OAGG;IACH,CAAC,EAAE,gBAAgB,CAAC;IAEpB;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;CACtB;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAU,SAAQ,QAAQ,EAAE,gBAAgB;IAC3D;;;;;;;;;;;;;;;OAeG;IACH,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,sCAAsC;AACtC,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;OAGG;IACH,CAAC,EAAE,gBAAgB,CAAC;CACrB;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAU,SAAQ,QAAQ,EAAE,gBAAgB;IAC3D;;;;;;;;;;;;;;;OAeG;IACH,IAAI,EAAE,WAAW,CAAC;CACnB"}
@@ -0,0 +1,22 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { InsetOptions, MarkOptions } from './Marks.js';
3
+ import { RectCornerOptions } from './Rect.js';
4
+ /** Options for the frame decoration mark. */
5
+ export interface FrameOptions extends MarkOptions, InsetOptions, RectCornerOptions {
6
+ /**
7
+ * If null (default), the rectangular outline of the frame is drawn;
8
+ * otherwise the frame is drawn as a line only on the given side, and the
9
+ * **rx**, **ry**, **fill**, and **fillOpacity** options are ignored.
10
+ */
11
+ anchor?: 'top' | 'right' | 'bottom' | 'left' | null | ParamRef;
12
+ }
13
+ /** The frame mark. */
14
+ export interface Frame extends FrameOptions {
15
+ /**
16
+ * Draws a rectangle around the plot’s frame, or if an **anchor** is given,
17
+ * a line on the given side. Useful for visual separation of facets, or in
18
+ * conjunction with axes and grids to fill the frame’s background.
19
+ */
20
+ mark: 'frame';
21
+ }
22
+ //# sourceMappingURL=Frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,6CAA6C;AAC7C,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,YAAY,EAAE,iBAAiB;IAChF;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CAChE;AAED,sBAAsB;AACtB,MAAM,WAAW,KAAM,SAAQ,YAAY;IACzC;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf"}
@@ -0,0 +1,54 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { ChannelValue, ChannelValueSpec, MarkData, MarkOptions } from './Marks.js';
3
+ /** Options for the geo mark. */
4
+ export interface GeoOptions extends MarkOptions {
5
+ /**
6
+ * A required channel for the geometry to render; defaults to identity,
7
+ * assuming *data* is a GeoJSON object or an iterable of GeoJSON objects.
8
+ */
9
+ geometry?: ChannelValue;
10
+ /**
11
+ * The size of Point and MultiPoint geometries, defaulting to a constant 3
12
+ * pixels. If **r** is a number, it is interpreted as a constant radius in
13
+ * pixels; otherwise it is interpreted as a channel and the effective radius
14
+ * is controlled by the *r* scale, which defaults to a *sqrt* scale such that
15
+ * the visual area of a point is proportional to its associated value.
16
+ *
17
+ * If **r** is a channel, geometries will be sorted by descending radius by
18
+ * default, to limit occlusion; use the **sort** transform to control render
19
+ * order. Geometries with a nonpositive radius are not drawn.
20
+ */
21
+ r?: ChannelValueSpec | ParamRef;
22
+ }
23
+ /** The geo mark. */
24
+ export interface Geo extends MarkData, GeoOptions {
25
+ /**
26
+ * A geo mark. The **geometry** channel, which defaults to the identity
27
+ * function assuming that *data* is a GeoJSON object or an iterable of
28
+ * GeoJSON objects, is projected to the plane using the plot’s top-level
29
+ * **projection**.
30
+ *
31
+ * If *data* is a GeoJSON feature collection, then the mark’s data is
32
+ * *data*.features; if *data* is a GeoJSON geometry collection, then the
33
+ * mark’s data is *data*.geometries; if *data* is some other GeoJSON
34
+ * object, then the mark’s data is the single-element array [*data*].
35
+ */
36
+ mark: 'geo';
37
+ }
38
+ /** The sphere mark. */
39
+ export interface Sphere extends MarkOptions {
40
+ /**
41
+ * A geo mark whose *data* is the outline of the sphere on the
42
+ * projection’s plane. (For use with a spherical **projection** only.)
43
+ */
44
+ mark: 'sphere';
45
+ }
46
+ /** The graticule mark. */
47
+ export interface Graticule extends MarkOptions {
48
+ /**
49
+ * A geo mark whose *data* is a 10° global graticule. (For use with a
50
+ * spherical **projection** only.)
51
+ */
52
+ mark: 'graticule';
53
+ }
54
+ //# sourceMappingURL=Geo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Geo.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Geo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnF,gCAAgC;AAChC,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;;;;;;;;;OAUG;IACH,CAAC,CAAC,EAAE,gBAAgB,GAAG,QAAQ,CAAC;CACjC;AAED,oBAAoB;AACpB,MAAM,WAAW,GAAI,SAAQ,QAAQ,EAAE,UAAU;IAC/C;;;;;;;;;;OAUG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED,uBAAuB;AACvB,MAAM,WAAW,MAAO,SAAQ,WAAW;IACzC;;;OAGG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;;OAGG;IACH,IAAI,EAAE,WAAW,CAAC;CACnB"}
@@ -0,0 +1,31 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { DotOptions } from './Dot.js';
3
+ import { ChannelValue, MarkData, TextStyles } from './Marks.js';
4
+ export interface HexbinOptions extends DotOptions, TextStyles {
5
+ /**
6
+ * The basic mark type to use for hex-binned values.
7
+ * Defaults to a hexagon mark; dot and text marks are also supported.
8
+ */
9
+ type?: 'dot' | 'circle' | 'hexagon' | 'text' | ParamRef;
10
+ /**
11
+ * The distance between centers of neighboring hexagons, in pixels; defaults
12
+ * to 20. If also using a hexgrid mark, use matching **binWidth** values.
13
+ */
14
+ binWidth?: number | ParamRef;
15
+ /**
16
+ * How to subdivide bins. If not specified, defaults to the *fill* channel,
17
+ * if any, or the *stroke* channel, if any. If null, bins will not be
18
+ * subdivided.
19
+ */
20
+ z?: ChannelValue;
21
+ }
22
+ /** The hexbin mark. */
23
+ export interface Hexbin extends MarkData, HexbinOptions {
24
+ /**
25
+ * A hexbin mark that bins **x** and **y** data into a hexagonal grid and
26
+ * visualizes aggregate functions per bin (e.g., count for binned density).
27
+ * Aggregate functions can be used for fill, stroke, or r (radius) options.
28
+ */
29
+ mark: 'hexbin';
30
+ }
31
+ //# sourceMappingURL=Hexbin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hexbin.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Hexbin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEhE,MAAM,WAAW,aAAc,SAAQ,UAAU,EAAE,UAAU;IAC3D;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAExD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE7B;;;;OAIG;IACH,CAAC,CAAC,EAAE,YAAY,CAAC;CAClB;AAED,uBAAuB;AACvB,MAAM,WAAW,MAAO,SAAQ,QAAQ,EAAE,aAAa;IACrD;;;;OAIG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB"}
@@ -0,0 +1,26 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { MarkOptions } from './Marks.js';
3
+ /** Options for the hexgrid mark. */
4
+ export interface HexgridOptions extends MarkOptions {
5
+ /**
6
+ * The distance between centers of neighboring hexagons, in pixels; defaults
7
+ * to 20. Should match the **binWidth** of the hexbin mark.
8
+ */
9
+ binWidth?: number | ParamRef;
10
+ }
11
+ /** The hexgrid mark. */
12
+ export interface Hexgrid extends HexgridOptions {
13
+ /**
14
+ * The hexgrid decoration mark complements the hexbin mark, showing the
15
+ * outlines of all hexagons spanning the frame with a default **stroke** of
16
+ * *currentColor* and a default **strokeOpacity** of 0.1, similar to the
17
+ * default axis grids.
18
+ *
19
+ * Note that the **binWidth** option of the hexgrid mark should match that of
20
+ * the hexbin transform. The grid is clipped by the frame. This is a
21
+ * stroke-only mark, and **fill** is not supported; to fill the frame,
22
+ * use the frame mark.
23
+ */
24
+ mark: 'hexgrid';
25
+ }
26
+ //# sourceMappingURL=Hexgrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hexgrid.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Hexgrid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,oCAAoC;AACpC,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC9B;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,cAAc;IAC7C;;;;;;;;;;OAUG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB"}
@@ -0,0 +1,90 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { FrameAnchor } from '../PlotTypes.js';
3
+ import { ChannelValue, ChannelValueSpec, MarkData, MarkOptions } from './Marks.js';
4
+ /** Options for the image mark. */
5
+ export interface ImageOptions extends MarkOptions {
6
+ /**
7
+ * The horizontal position channel specifying the image’s center; typically
8
+ * bound to the *x* scale.
9
+ */
10
+ x?: ChannelValueSpec;
11
+ /**
12
+ * The vertical position channel specifying the image’s center; typically
13
+ * bound to the *y* scale.
14
+ */
15
+ y?: ChannelValueSpec;
16
+ /**
17
+ * The image width in pixels. When a number, it is interpreted as a constant
18
+ * radius in pixels; otherwise it is interpreted as a channel. Also sets the
19
+ * default **height**; if neither are set, defaults to 16. Images with a
20
+ * nonpositive width are not drawn.
21
+ */
22
+ width?: ChannelValue | ParamRef;
23
+ /**
24
+ * The image height in pixels. When a number, it is interpreted as a constant
25
+ * radius in pixels; otherwise it is interpreted as a channel. Also sets the
26
+ * default **height**; if neither are set, defaults to 16. Images with a
27
+ * nonpositive height are not drawn.
28
+ */
29
+ height?: ChannelValue | ParamRef;
30
+ /**
31
+ * The image clip radius, for circular images. If null (default), images are
32
+ * not clipped; when a number, it is interpreted as a constant in pixels;
33
+ * otherwise it is interpreted as a channel, typically bound to the *r* scale.
34
+ * Also defaults **height** and **width** to twice its value.
35
+ */
36
+ r?: ChannelValue | ParamRef;
37
+ /**
38
+ * The rotation angle, in degrees clockwise. When a number, it is interpreted
39
+ * as a constant; otherwise it is interpreted as a channel.
40
+ */
41
+ rotate?: ChannelValue | ParamRef;
42
+ /**
43
+ * The required image URL (or relative path). If a string that starts with a
44
+ * dot, slash, or URL protocol (*e.g.*, “https:”) it is assumed to be a
45
+ * constant; otherwise it is interpreted as a channel.
46
+ */
47
+ src?: ChannelValue | ParamRef;
48
+ /**
49
+ * The image [aspect ratio][1]; defaults to *xMidYMid meet*. To crop the image
50
+ * instead of scaling it to fit, use *xMidYMid slice*.
51
+ *
52
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
53
+ */
54
+ preserveAspectRatio?: string | ParamRef;
55
+ /**
56
+ * The [cross-origin][1] behavior. See the [Plot.image notebook][2] for details.
57
+ *
58
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/crossorigin
59
+ * [2]: https://observablehq.com/@observablehq/plot-image
60
+ */
61
+ crossOrigin?: string | ParamRef;
62
+ /**
63
+ * The frame anchor specifies defaults for **x** and **y** based on the plot’s
64
+ * frame; it may be one of the four sides (*top*, *right*, *bottom*, *left*),
65
+ * one of the four corners (*top-left*, *top-right*, *bottom-right*,
66
+ * *bottom-left*), or the *middle* of the frame.
67
+ */
68
+ frameAnchor?: FrameAnchor | ParamRef;
69
+ /**
70
+ * The [image-rendering attribute][1]; defaults to *auto* (bilinear). The
71
+ * option may be set to *pixelated* to disable bilinear interpolation for a
72
+ * sharper image; however, note that this is not supported in WebKit.
73
+ *
74
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/image-rendering
75
+ */
76
+ imageRendering?: string | ParamRef;
77
+ }
78
+ export interface Image extends MarkData, ImageOptions {
79
+ /**
80
+ * An image mark that draws images as in a scatterplot.
81
+ *
82
+ * If either **x** or **y** is not specified, the default is determined by
83
+ * the **frameAnchor** option. If none of **x**, **y**, and **frameAnchor**
84
+ * are specified, *data* is assumed to be an array of pairs [[*x₀*, *y₀*],
85
+ * [*x₁*, *y₁*], [*x₂*, *y₂*], …] such that **x** = [*x₀*, *x₁*, *x₂*, …]
86
+ * and **y** = [*y₀*, *y₁*, *y₂*, …].
87
+ */
88
+ mark: 'image';
89
+ }
90
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnF,kCAAkC;AAClC,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAEhC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAEjC;;;;;OAKG;IACH,CAAC,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAEjC;;;;OAIG;IACH,GAAG,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAExC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEhC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IAErC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACpC;AAED,MAAM,WAAW,KAAM,SAAQ,QAAQ,EAAE,YAAY;IACnD;;;;;;;;OAQG;IACH,IAAI,EAAE,OAAO,CAAC;CACf"}