File size: 1,405 Bytes
5370626
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import type { Gradio, SelectData } from "@gradio/utils";
import type { LoadingStatus } from "@gradio/statustracker";

export interface PlotData {
	columns: string[];
	data: [string | number][];
	datatypes: Record<string, "quantitative" | "temporal" | "nominal">;
	mark: "line" | "point" | "bar";
}

export interface NativePlotProps {
	value: PlotData | null;
	x: string;
	y: string;
	color: string | null;
	title: string | null;
	x_title: string | null;
	y_title: string | null;
	color_title: string | null;
	x_bin: string | number | null;
	y_aggregate: "sum" | "mean" | "median" | "min" | "max" | undefined;
	color_map: Record<string, string> | null;
	colors_in_legend: string[] | null;
	x_lim: [number | null, number | null] | null;
	y_lim: [number | null, number | null] | null;
	x_label_angle: number | null;
	y_label_angle: number | null;
	x_axis_labels_visible: boolean;
	caption: string | null;
	sort: "x" | "y" | "-x" | "-y" | string[] | null;
	tooltip: "axis" | "none" | "all" | string[];
	buttons: string[] | null;
	_selectable: boolean;
	label: string;
	elem_id: string;
	elem_classes: string[];
	visible: boolean | "hidden";
	show_label: boolean;
	scale: number | null;
	min_width: number | undefined;
	loading_status: LoadingStatus | undefined;
	height: number | undefined;
}

export interface NativePlotEvents {
	select: SelectData;
	double_click: undefined;
	clear_status: LoadingStatus;
}