@@ -3,18 +3,74 @@ import type {CurveOptions} from "../curve.js";
3
3
import type { Data , MarkOptions , RenderableMark } from "../mark.js" ;
4
4
import type { MarkerOptions } from "../marker.js" ;
5
5
6
+ /** Options for the Delaunay marks. */
6
7
export interface DelaunayOptions extends MarkOptions , MarkerOptions , CurveOptions {
8
+ /** A channel for the horizontal position, typically bound to the *x* scale. */
7
9
x ?: ChannelValueSpec ;
10
+ /** A channel for the vertical position, typically bound to the *y* scale. */
8
11
y ?: ChannelValueSpec ;
12
+ /** Groups points into series, constructing a mark for each group. */
9
13
z ?: ChannelValue ;
10
14
}
11
15
16
+ /**
17
+ * Draws links for each edge of the Delaunay triangulation of the *data* points
18
+ * given by the **x** and **y** channels. Supports the same options as the
19
+ * **link**, except that **x1**, **y1**, **x2**, and **y2** are derived
20
+ * automatically from **x** and **y**. When an aesthetic channel is specified
21
+ * (such as **stroke** or **strokeWidth**), the link inherits the corresponding
22
+ * channel value from one of its two endpoints arbitrarily.
23
+ *
24
+ * If a **z** channel is specified, the input points are grouped by *z*, and
25
+ * separate Delaunay triangulations are constructed for each group.
26
+ */
12
27
export function delaunayLink ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
13
28
29
+ /**
30
+ * Draws a mesh of the Delaunay triangulation of the points given by the **x**
31
+ * and **y** channels. The **stroke** option defaults to _currentColor_, and the
32
+ * **strokeOpacity** defaults to 0.2. The **fill** option is not supported. When
33
+ * an aesthetic channel is specified (such as **stroke** or **strokeWidth**),
34
+ * the mesh inherits the corresponding channel value from one of its constituent
35
+ * points arbitrarily.
36
+ *
37
+ * If a **z** channel is specified, the input points are grouped by *z*, and
38
+ * separate Delaunay triangulations are constructed for each group.
39
+ */
14
40
export function delaunayMesh ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
15
41
42
+ /**
43
+ * Draws a convex hull around the points given by the **x** and **y** channels.
44
+ * The **stroke** option defaults to _currentColor_ and the **fill** option
45
+ * defaults to _none_. When an aesthetic channel is specified (such as
46
+ * **stroke** or **strokeWidth**), the hull inherits the corresponding channel
47
+ * value from one of its constituent points arbitrarily.
48
+ *
49
+ * If a **z** channel is specified, the input points are grouped by *z*, and
50
+ * separate convex hulls are constructed for each group. If the **z** channel is
51
+ * not specified, it defaults to either the **fill** channel, if any, or the
52
+ * **stroke** channel, if any.
53
+ */
16
54
export function hull ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
17
55
56
+ /**
57
+ * Draws polygons for each cell of the Voronoi tesselation of the points given
58
+ * by the **x** and **y** channels.
59
+ *
60
+ * If a **z** channel is specified, the input points are grouped by *z*, and
61
+ * separate Voronoi tesselations are constructed for each group.
62
+ */
18
63
export function voronoi ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
19
64
65
+ /**
66
+ * Draws a mesh for the cell boundaries of the Voronoi tesselation of the points
67
+ * given by the **x** and **y** channels. The **stroke** option defaults to
68
+ * _currentColor_, and the **strokeOpacity** defaults to 0.2. The **fill**
69
+ * option is not supported. When an aesthetic channel is specified (such as
70
+ * **stroke** or **strokeWidth**), the mesh inherits the corresponding channel
71
+ * value from one of its constituent points arbitrarily.
72
+ *
73
+ * If a **z** channel is specified, the input points are grouped by *z*, and
74
+ * separate Voronoi tesselations are constructed for each group.
75
+ */
20
76
export function voronoiMesh ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
0 commit comments