@@ -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
+ /** An optional ordinal channel for grouping to produce multiple (possibly overlapping) triangulations. */
9
13
z ?: ChannelValue ;
10
14
}
11
15
16
+ /**
17
+ * Returns a mark that draws links for each edge of the Delaunay triangulation
18
+ * of the points given by the **x** and **y** channels. Like the link mark,
19
+ * except that **x1**, **y1**, **x2**, and **y2** are derived automatically from
20
+ * **x** and **y**. When an aesthetic channel is specified (such as **stroke**
21
+ * or **strokeWidth**), the link inherits the corresponding channel value from
22
+ * 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
+ */
12
27
export function delaunayLink ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
13
28
29
+ /**
30
+ * Returns a mark that draws a mesh of the Delaunay triangulation of the points
31
+ * given by the **x** and **y** channels. The **stroke** option defaults to
32
+ * _currentColor_, and the **strokeOpacity** defaults to 0.2; the **fill**
33
+ * option is not supported. When an aesthetic channel is specified (such as
34
+ * **stroke** or **strokeWidth**), the mesh inherits the corresponding channel
35
+ * value from one of its constituent points arbitrarily.
36
+ *
37
+ * If **z** is specified, the input points are grouped by *z*, producing a
38
+ * separate Delaunay triangulation for each group.
39
+ */
14
40
export function delaunayMesh ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
15
41
42
+ /**
43
+ * Returns a mark that draws a convex hull around the points given by the **x**
44
+ * and **y** channels. The **stroke** option defaults to _currentColor_ and the
45
+ * **fill** option defaults to _none_. When an aesthetic channel is specified
46
+ * (such as **stroke** or **strokeWidth**), the hull inherits the corresponding
47
+ * channel value from one of its constituent points arbitrarily.
48
+ *
49
+ * If **z** is specified, the input points are grouped by *z*, producing a
50
+ * separate hull for each group. If **z** is not specified, it defaults to the
51
+ * **fill** channel, if any, or the **stroke** channel, if any.
52
+ */
16
53
export function hull ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
17
54
55
+ /**
56
+ * Returns a mark that draws polygons for each cell of the Voronoi tesselation
57
+ * of the points given by the **x** and **y** channels.
58
+ *
59
+ * If **z** is specified, the input points are grouped by *z*, producing a
60
+ * separate Voronoi tesselation for each group.
61
+ */
18
62
export function voronoi ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
19
63
64
+ /**
65
+ * Returns a mark that draws a mesh for the cell boundaries of the Voronoi
66
+ * tesselation of the points given by the **x** and **y** channels. The
67
+ * **stroke** option defaults to _currentColor_, and the **strokeOpacity**
68
+ * defaults to 0.2. The **fill** option is not supported. When an aesthetic
69
+ * channel is specified (such as **stroke** or **strokeWidth**), the mesh
70
+ * inherits the corresponding channel value from one of its constituent points
71
+ * arbitrarily.
72
+ *
73
+ * If **z** is specified, the input points are grouped by *z*, producing a
74
+ * separate Voronoi tesselation for each group.
75
+ */
20
76
export function voronoiMesh ( data ?: Data , options ?: DelaunayOptions ) : RenderableMark ;
0 commit comments