forked from observablehq/plot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauto.d.ts
28 lines (24 loc) · 1.33 KB
/
auto.d.ts
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
import type {ChannelValue} from "../channel.js";
import type {CompoundMark, Data} from "../mark.js";
import type {Reducer} from "../reducer.js";
import type {BinOptions} from "../transforms/bin.js";
export interface AutoOptions {
x?: ChannelValue | Reducer | ({value?: ChannelValue; reduce?: Reducer | null; zero?: boolean} & BinOptions);
y?: ChannelValue | Reducer | ({value?: ChannelValue; reduce?: Reducer | null; zero?: boolean} & BinOptions);
color?: ChannelValue | Reducer | {value?: ChannelValue; reduce?: Reducer | null; color?: string};
size?: ChannelValue | Reducer | {value?: ChannelValue; reduce?: Reducer | null};
fx?: ChannelValue | {value?: ChannelValue};
fy?: ChannelValue | {value?: ChannelValue};
mark?: "dot" | "line" | "area" | "rule" | "bar";
}
export interface AutoSpec extends AutoOptions {
x: {value: ChannelValue; reduce: Reducer | null; zero?: boolean} & BinOptions;
y: {value: ChannelValue; reduce: Reducer | null; zero?: boolean} & BinOptions;
color: {value: ChannelValue; reduce: Reducer | null; color?: string};
size: {value: ChannelValue; reduce: Reducer | null};
fx: ChannelValue;
fy: ChannelValue;
mark: "dot" | "line" | "area" | "rule" | "bar";
}
export function autoSpec(data?: Data, options?: AutoOptions): AutoSpec;
export function auto(data?: Data, options?: AutoOptions): CompoundMark;