@uwdata/mosaic-spec 0.16.2 → 0.17.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 (97) hide show
  1. package/package.json +8 -12
  2. package/src/ast/TransformNode.js +11 -17
  3. package/src/ast/WindowFrameNode.js +61 -0
  4. package/src/config/transforms.js +8 -0
  5. package/src/constants.js +1 -0
  6. package/src/spec/Interval.ts +75 -0
  7. package/src/spec/Transform.ts +56 -46
  8. package/tsconfig.json +10 -8
  9. package/LICENSE +0 -47
  10. package/dist/mosaic-schema.json +0 -200164
  11. package/dist/types/ast/ASTNode.d.ts +0 -26
  12. package/dist/types/ast/ColumnParamRefNode.d.ts +0 -8
  13. package/dist/types/ast/DataNode.d.ts +0 -60
  14. package/dist/types/ast/ExpressionNode.d.ts +0 -13
  15. package/dist/types/ast/HConcatNode.d.ts +0 -10
  16. package/dist/types/ast/HSpaceNode.d.ts +0 -11
  17. package/dist/types/ast/InputNode.d.ts +0 -8
  18. package/dist/types/ast/LiteralNode.d.ts +0 -7
  19. package/dist/types/ast/OptionsNode.d.ts +0 -10
  20. package/dist/types/ast/ParamNode.d.ts +0 -8
  21. package/dist/types/ast/ParamRefNode.d.ts +0 -8
  22. package/dist/types/ast/PlotAttributeNode.d.ts +0 -18
  23. package/dist/types/ast/PlotFromNode.d.ts +0 -9
  24. package/dist/types/ast/PlotInteractorNode.d.ts +0 -8
  25. package/dist/types/ast/PlotLegendNode.d.ts +0 -10
  26. package/dist/types/ast/PlotMarkNode.d.ts +0 -10
  27. package/dist/types/ast/PlotNode.d.ts +0 -11
  28. package/dist/types/ast/SelectionNode.d.ts +0 -24
  29. package/dist/types/ast/SpecNode.d.ts +0 -10
  30. package/dist/types/ast/TransformNode.d.ts +0 -21
  31. package/dist/types/ast/VConcatNode.d.ts +0 -10
  32. package/dist/types/ast/VSpaceNode.d.ts +0 -11
  33. package/dist/types/ast-to-dom.d.ts +0 -40
  34. package/dist/types/ast-to-esm.d.ts +0 -64
  35. package/dist/types/config/components.d.ts +0 -4
  36. package/dist/types/config/extensions.d.ts +0 -9
  37. package/dist/types/config/inputs.d.ts +0 -5
  38. package/dist/types/config/plots.d.ts +0 -34
  39. package/dist/types/config/transforms.d.ts +0 -4
  40. package/dist/types/constants.d.ts +0 -31
  41. package/dist/types/index.d.ts +0 -29
  42. package/dist/types/parse-spec.d.ts +0 -111
  43. package/dist/types/spec/CSSStyles.d.ts +0 -3
  44. package/dist/types/spec/Data.d.ts +0 -165
  45. package/dist/types/spec/Expression.d.ts +0 -27
  46. package/dist/types/spec/HConcat.d.ts +0 -8
  47. package/dist/types/spec/HSpace.d.ts +0 -9
  48. package/dist/types/spec/Input.d.ts +0 -212
  49. package/dist/types/spec/Param.d.ts +0 -63
  50. package/dist/types/spec/Plot.d.ts +0 -14
  51. package/dist/types/spec/PlotAttribute.d.ts +0 -1534
  52. package/dist/types/spec/PlotFrom.d.ts +0 -20
  53. package/dist/types/spec/PlotInteractor.d.ts +0 -9
  54. package/dist/types/spec/PlotLegend.d.ts +0 -68
  55. package/dist/types/spec/PlotMark.d.ts +0 -28
  56. package/dist/types/spec/PlotTypes.d.ts +0 -293
  57. package/dist/types/spec/Spec.d.ts +0 -52
  58. package/dist/types/spec/Transform.d.ts +0 -346
  59. package/dist/types/spec/VConcat.d.ts +0 -8
  60. package/dist/types/spec/VSpace.d.ts +0 -9
  61. package/dist/types/spec/interactors/BrushStyles.d.ts +0 -27
  62. package/dist/types/spec/interactors/Highlight.d.ts +0 -37
  63. package/dist/types/spec/interactors/Interval1D.d.ts +0 -42
  64. package/dist/types/spec/interactors/Interval2D.d.ts +0 -47
  65. package/dist/types/spec/interactors/Nearest.d.ts +0 -44
  66. package/dist/types/spec/interactors/PanZoom.d.ts +0 -58
  67. package/dist/types/spec/interactors/Region.d.ts +0 -32
  68. package/dist/types/spec/interactors/Toggle.d.ts +0 -59
  69. package/dist/types/spec/marks/Area.d.ts +0 -139
  70. package/dist/types/spec/marks/Arrow.d.ts +0 -94
  71. package/dist/types/spec/marks/Axis.d.ts +0 -281
  72. package/dist/types/spec/marks/Bar.d.ts +0 -150
  73. package/dist/types/spec/marks/Cell.d.ts +0 -57
  74. package/dist/types/spec/marks/Contour.d.ts +0 -23
  75. package/dist/types/spec/marks/Delaunay.d.ts +0 -86
  76. package/dist/types/spec/marks/DenseLine.d.ts +0 -27
  77. package/dist/types/spec/marks/Density.d.ts +0 -136
  78. package/dist/types/spec/marks/Dot.d.ts +0 -133
  79. package/dist/types/spec/marks/ErrorBar.d.ts +0 -82
  80. package/dist/types/spec/marks/Frame.d.ts +0 -21
  81. package/dist/types/spec/marks/Geo.d.ts +0 -53
  82. package/dist/types/spec/marks/Hexbin.d.ts +0 -30
  83. package/dist/types/spec/marks/Hexgrid.d.ts +0 -25
  84. package/dist/types/spec/marks/Image.d.ts +0 -89
  85. package/dist/types/spec/marks/Line.d.ts +0 -82
  86. package/dist/types/spec/marks/Link.d.ts +0 -60
  87. package/dist/types/spec/marks/Marks.d.ts +0 -910
  88. package/dist/types/spec/marks/Raster.d.ts +0 -124
  89. package/dist/types/spec/marks/Rect.d.ts +0 -166
  90. package/dist/types/spec/marks/Regression.d.ts +0 -58
  91. package/dist/types/spec/marks/Rule.d.ts +0 -100
  92. package/dist/types/spec/marks/Text.d.ts +0 -110
  93. package/dist/types/spec/marks/Tick.d.ts +0 -61
  94. package/dist/types/spec/marks/Vector.d.ts +0 -99
  95. package/dist/types/spec/marks/Waffle.d.ts +0 -58
  96. package/dist/types/util.d.ts +0 -12
  97. package/jsconfig.json +0 -10
@@ -1,82 +0,0 @@
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 {};
@@ -1,21 +0,0 @@
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
- }
@@ -1,53 +0,0 @@
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
- }
@@ -1,30 +0,0 @@
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
- }
@@ -1,25 +0,0 @@
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
- }
@@ -1,89 +0,0 @@
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
- }
@@ -1,82 +0,0 @@
1
- import { ChannelValue, ChannelValueSpec, CurveAutoOptions, MarkData, MarkOptions, MarkerOptions } from './Marks.js';
2
- /** Options for the line mark. */
3
- export interface LineOptions extends MarkOptions, MarkerOptions, CurveAutoOptions {
4
- /**
5
- * The required horizontal position channel, typically bound to the *x*
6
- * scale.
7
- */
8
- x?: ChannelValueSpec;
9
- /**
10
- * The required vertical position channel, typically bound to the *y* scale.
11
- */
12
- y?: ChannelValueSpec;
13
- /**
14
- * An optional ordinal channel for grouping data into (possibly stacked)
15
- * series to be drawn as separate lines. If not specified, it defaults to
16
- * **fill** if a channel, or **stroke** if a channel.
17
- */
18
- z?: ChannelValue;
19
- }
20
- /** Options for the lineX mark. */
21
- export interface LineXOptions extends LineOptions {
22
- /**
23
- * The vertical position channel, typically bound to the *y* scale;
24
- * defaults to the zero-based index of the data [0, 1, 2, …].
25
- */
26
- y?: ChannelValueSpec;
27
- }
28
- /** Options for the lineY mark. */
29
- export interface LineYOptions extends LineOptions {
30
- /**
31
- * The horizontal position channel, typically bound to the *x* scale;
32
- * defaults to the zero-based index of the data [0, 1, 2, …].
33
- */
34
- x?: ChannelValueSpec;
35
- }
36
- /** The line mark. */
37
- export interface Line extends MarkData, LineOptions {
38
- /**
39
- * A line mark that connects control points.
40
- *
41
- * Points along the line are connected in input order. If there are multiple
42
- * series via the **z**, **fill**, or **stroke** channel, series are drawn in
43
- * input order such that the last series is drawn on top. Typically *data* is
44
- * already in sorted order, such as chronological for time series; if needed,
45
- * consider a **sort** transform.
46
- *
47
- * If any **x** or **y** values are invalid (undefined, null, or NaN), the
48
- * line will be interrupted, resulting in a break that divides the line shape
49
- * into multiple segments. If a line segment consists of only a single point,
50
- * it may appear invisible unless rendered with rounded or square line caps.
51
- * In addition, some curves such as *cardinal-open* only render a visible
52
- * segment if it contains multiple points.
53
- *
54
- * Variable aesthetic channels are supported: if the **stroke** is defined as
55
- * a channel, the line will be broken into contiguous overlapping segments
56
- * when the stroke color changes; the stroke color will apply to the interval
57
- * spanning the current data point and the following data point. This
58
- * behavior also applies to the **fill**, **fillOpacity**, **strokeOpacity**,
59
- * **strokeWidth**, **opacity**, **href**, **title**, and **ariaLabel**
60
- * channels. When any of these channels are used, setting an explicit **z**
61
- * channel (possibly to null) is strongly recommended.
62
- */
63
- mark: 'line';
64
- }
65
- /** The lineX mark. */
66
- export interface LineX extends MarkData, LineXOptions {
67
- /**
68
- * Like line, except that **x** defaults to the identity function assuming
69
- * that *data* = [*x₀*, *x₁*, *x₂*, …] and **y** defaults to the zero-based
70
- * index [0, 1, 2, …].
71
- */
72
- mark: 'lineX';
73
- }
74
- /** The lineY mark. */
75
- export interface LineY extends MarkData, LineYOptions {
76
- /**
77
- * Like line, except **y** defaults to the identity function and assumes
78
- * that *data* = [*y₀*, *y₁*, *y₂*, …] and **x** defaults to the zero-based
79
- * index [0, 1, 2, …].
80
- */
81
- mark: 'lineY';
82
- }
@@ -1,60 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- import { ChannelValueSpec, CurveAutoOptions, MarkData, MarkOptions, MarkerOptions } from './Marks.js';
3
- /** Options for the link mark. */
4
- export interface LinkOptions extends MarkOptions, MarkerOptions, CurveAutoOptions {
5
- /**
6
- * The horizontal position, for vertical links; typically bound to the *x*
7
- * scale; shorthand for setting defaults for both **x1** and **x2**.
8
- */
9
- x?: ChannelValueSpec;
10
- /**
11
- * The vertical position, for horizontal links; typically bound to the *y*
12
- * scale; shorthand for setting defaults for both **y1** and **y2**.
13
- */
14
- y?: ChannelValueSpec;
15
- /**
16
- * The starting horizontal position; typically bound to the *x* scale; also
17
- * sets a default for **x2**.
18
- */
19
- x1?: ChannelValueSpec;
20
- /**
21
- * The starting vertical position; typically bound to the *y* scale; also sets
22
- * a default for **y2**.
23
- */
24
- y1?: ChannelValueSpec;
25
- /**
26
- * The ending horizontal position; typically bound to the *x* scale; also sets
27
- * a default for **x1**.
28
- */
29
- x2?: ChannelValueSpec;
30
- /**
31
- * The ending vertical position; typically bound to the *y* scale; also sets a
32
- * default for **y1**.
33
- */
34
- y2?: ChannelValueSpec;
35
- /**
36
- * The curve (interpolation) method for connecting adjacent points.
37
- *
38
- * Since a link has exactly two points, only the following curves (or a custom
39
- * curve) are recommended: *linear*, *step*, *step-after*, *step-before*,
40
- * *bump-x*, or *bump-y*. Note that the *linear* curve is incapable of showing
41
- * a fill since a straight line has zero area. For a curved link, use an arrow
42
- * mark with the **bend** option.
43
- *
44
- * If the plot uses a spherical **projection**, the default *auto* **curve**
45
- * will render links as geodesics; to draw a straight line instead, use the
46
- * *linear* **curve**.
47
- */
48
- curve?: CurveAutoOptions['curve'] | ParamRef;
49
- }
50
- /** The link mark. */
51
- export interface Link extends MarkData, LinkOptions {
52
- /**
53
- * A link mark, drawing line segments (curves) connecting pairs of points.
54
- *
55
- * If the plot uses a spherical **projection**, the default *auto* **curve**
56
- * will render links as geodesics; to draw a straight line instead, use the
57
- * *linear* **curve**.
58
- */
59
- mark: 'link';
60
- }