-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathtick.d.ts
More file actions
82 lines (74 loc) · 2.98 KB
/
tick.d.ts
File metadata and controls
82 lines (74 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import type {ChannelValueSpec} from "../channel.js";
import type {InsetOptions} from "../inset.js";
import type {Data, MarkOptions, RenderableMark} from "../mark.js";
import type {MarkerOptions} from "../marker.js";
/** Options for the tickX mark. */
export interface TickXOptions extends MarkOptions, MarkerOptions, Omit<InsetOptions, "insetLeft" | "insetRight"> {
/**
* The required horizontal position of the tick; a channel typically bound to
* the *x* scale.
*/
x?: ChannelValueSpec;
/**
* The optional vertical position of the tick; an ordinal channel typically
* bound to the *y* scale. If not specified, the tick spans the vertical
* extent of the frame; otherwise the *y* scale must be a *band* scale.
*
* If *y* represents quantitative or temporal values, use a ruleX mark
* instead.
*/
y?: ChannelValueSpec;
}
/** Options for the tickY mark. */
export interface TickYOptions extends MarkOptions, MarkerOptions, Omit<InsetOptions, "insetTop" | "insetBottom"> {
/**
* The required vertical position of the tick; a channel typically bound to
* the *y* scale.
*/
y?: ChannelValueSpec;
/**
* The optional horizontal position of the tick; an ordinal channel typically
* bound to the *x* scale. If not specified, the tick spans the horizontal
* extent of the frame; otherwise the *x* scale must be a *band* scale.
*
* If *x* represents quantitative or temporal values, use a ruleY mark
* instead.
*/
x?: ChannelValueSpec;
}
/**
* Returns a new horizontally-positioned tickX mark (a vertical line, |) for the
* given *data* and *options*. The **x** channel specifies the tick’s horizontal
* position and defaults to identity, assuming that *data* = [*x₀*, *x₁*, *x₂*,
* …]; the optional **y** ordinal channel specifies its vertical position. For
* example, for a horizontal barcode plot of penguins’ weights:
*
* ```js
* Plot.tickX(penguins, {x: "body_mass_g", y: "sex", stroke: "species"})
* ```
*
* If *y* represents quantitative or temporal values, use a ruleX mark instead.
*/
export function tickX(data?: Data, options?: TickXOptions): TickX;
/**
* Returns a new vertically-positioned tickY mark (a horizontal line, —) for the
* given *data* and *options*. The **y** channel specifies the vertical position
* of the tick and defaults to identity, assuming that *data* = [*y₀*, *y₁*,
* *y₂*, …]; the optional **x** ordinal channel specifies its horizontal
* position. For example, for a vertical barcode plot of penguins’ weights:
*
* ```js
* Plot.tickY(penguins, {y: "body_mass_g", x: "sex", stroke: "species"})
* ```
*
* If *x* represents quantitative or temporal values, use a ruleY mark instead.
*/
export function tickY(data?: Data, options?: TickYOptions): TickY;
/** The tickX mark. */
export class TickX extends RenderableMark {
constructor(data?: Data, options?: TickXOptions);
}
/** The tickY mark. */
export class TickY extends RenderableMark {
constructor(data?: Data, options?: TickYOptions);
}