import * as models from "./models"; import { HasProps } from "../core/has_props"; import { Omit, Color, Data, Attrs } from "../core/types"; import { Vector } from "../core/vectorization"; import { VectorSpec, ScalarSpec, Property } from "../core/properties"; import { Class } from "../core/class"; import { Location } from "../core/enums"; import { Glyph, Marker, GlyphRenderer, Axis, Grid, Range, Scale, Tool, Plot, ColumnarDataSource } from "./models"; import { LayoutDOM, LayoutDOMView } from "../models/layouts/layout_dom"; import { Legend } from "../models/annotations/legend"; export { gridplot } from "./gridplot"; export { rgb2hex as color } from "../core/util/color"; export declare type ToolName = "pan" | "xpan" | "ypan" | "xwheel_pan" | "ywheel_pan" | "wheel_zoom" | "xwheel_zoom" | "ywheel_zoom" | "zoom_in" | "xzoom_in" | "yzoom_in" | "zoom_out" | "xzoom_out" | "yzoom_out" | "click" | "tap" | "box_select" | "xbox_select" | "ybox_select" | "poly_select" | "lasso_select" | "box_zoom" | "xbox_zoom" | "ybox_zoom" | "crosshair" | "hover" | "save" | "undo" | "redo" | "reset" | "help"; export declare type VectorArg = T | T[] | Vector; export declare type ColorArg = VectorArg; export declare type AlphaArg = VectorArg; export declare type ColorAlpha = { color: ColorArg; selection_color: ColorArg; nonselection_color: ColorArg; hover_color: ColorArg; alpha: AlphaArg; selection_alpha: AlphaArg; nonselection_alpha: AlphaArg; hover_alpha: AlphaArg; }; export declare type AuxFill = { selection_fill_color: ColorArg; selection_fill_alpha: AlphaArg; nonselection_fill_color: ColorArg; nonselection_fill_alpha: AlphaArg; hover_fill_color: ColorArg; hover_fill_alpha: AlphaArg; }; export declare type AuxLine = { selection_line_color: ColorArg; selection_line_alpha: AlphaArg; nonselection_line_color: ColorArg; nonselection_line_alpha: AlphaArg; hover_line_color: ColorArg; hover_line_alpha: AlphaArg; }; export declare type AuxText = { selection_text_color: ColorArg; selection_text_alpha: AlphaArg; nonselection_text_color: ColorArg; nonselection_text_alpha: AlphaArg; hover_text_color: ColorArg; hover_text_alpha: AlphaArg; }; export declare type AuxGlyph = { source: ColumnarDataSource; legend: string; }; export declare type ArgsOf

= { [K in keyof P]: (P[K] extends VectorSpec ? T | T[] | V : (P[K] extends ScalarSpec ? T | S : (P[K] extends Property ? T : never))); }; export declare type GlyphArgs

= ArgsOf

& AuxGlyph & ColorAlpha; export declare type AnnularWedgeArgs = GlyphArgs & AuxLine & AuxFill; export declare type AnnulusArgs = GlyphArgs & AuxLine & AuxFill; export declare type ArcArgs = GlyphArgs & AuxLine; export declare type BezierArgs = GlyphArgs & AuxLine; export declare type CircleArgs = GlyphArgs & AuxLine & AuxFill; export declare type EllipseArgs = GlyphArgs & AuxLine & AuxFill; export declare type HBarArgs = GlyphArgs & AuxLine & AuxFill; export declare type HexTileArgs = GlyphArgs & AuxLine & AuxFill; export declare type ImageArgs = GlyphArgs; export declare type ImageRGBAArgs = GlyphArgs; export declare type ImageURLArgs = GlyphArgs; export declare type LineArgs = GlyphArgs & AuxLine; export declare type MarkerArgs = GlyphArgs & AuxLine & AuxFill; export declare type MultiLineArgs = GlyphArgs & AuxLine; export declare type MultiPolygonsArgs = GlyphArgs & AuxLine & AuxFill; export declare type OvalArgs = GlyphArgs & AuxLine & AuxFill; export declare type PatchArgs = GlyphArgs & AuxLine & AuxFill; export declare type PatchesArgs = GlyphArgs & AuxLine & AuxFill; export declare type QuadArgs = GlyphArgs & AuxLine & AuxFill; export declare type QuadraticArgs = GlyphArgs & AuxLine; export declare type RayArgs = GlyphArgs & AuxLine; export declare type RectArgs = GlyphArgs & AuxLine & AuxFill; export declare type ScatterArgs = GlyphArgs & AuxLine & AuxFill; export declare type SegmentArgs = GlyphArgs & AuxLine; export declare type StepArgs = GlyphArgs & AuxLine; export declare type TextArgs = GlyphArgs & AuxText; export declare type VBarArgs = GlyphArgs & AuxLine & AuxFill; export declare type WedgeArgs = GlyphArgs & AuxLine & AuxFill; export declare type AxisType = "auto" | "linear" | "datetime" | "log" | null; export declare type FigureAttrs = Omit & { x_range: Range | [number, number] | string[]; y_range: Range | [number, number] | string[]; x_axis_type: AxisType; y_axis_type: AxisType; x_axis_location: Location; y_axis_location: Location; x_axis_label: string; y_axis_label: string; x_minor_ticks: number | "auto"; y_minor_ticks: number | "auto"; tools: (Tool | ToolName)[] | string; }; export declare class Figure extends Plot { static __name__: string; readonly xgrid: Grid[]; readonly ygrid: Grid[]; readonly xaxis: Axis[]; readonly yaxis: Axis[]; readonly legend: Legend; constructor(attrs?: Partial); annular_wedge(args: Partial): GlyphRenderer; annular_wedge(x: AnnularWedgeArgs["x"], y: AnnularWedgeArgs["y"], inner_radius: AnnularWedgeArgs["inner_radius"], outer_radius: AnnularWedgeArgs["outer_radius"], start_angle: AnnularWedgeArgs["start_angle"], end_angle: AnnularWedgeArgs["end_angle"], args?: Partial): GlyphRenderer; annulus(args: Partial): GlyphRenderer; annulus(x: AnnulusArgs["x"], y: AnnulusArgs["y"], inner_radius: AnnulusArgs["inner_radius"], outer_radius: AnnulusArgs["outer_radius"], args?: Partial): GlyphRenderer; arc(args: Partial): GlyphRenderer; arc(x: ArcArgs["x"], y: ArcArgs["y"], radius: ArcArgs["radius"], start_angle: ArcArgs["start_angle"], end_angle: ArcArgs["end_angle"], args?: Partial): GlyphRenderer; bezier(args: Partial): GlyphRenderer; bezier(x0: BezierArgs["x0"], y0: BezierArgs["y0"], x1: BezierArgs["x1"], y1: BezierArgs["y1"], cx0: BezierArgs["cx0"], cy0: BezierArgs["cy0"], cx1: BezierArgs["cx1"], cy1: BezierArgs["cy1"], args?: Partial): GlyphRenderer; circle(args: Partial): GlyphRenderer; circle(x: CircleArgs["x"], y: CircleArgs["y"], args?: Partial): GlyphRenderer; ellipse(args: Partial): GlyphRenderer; ellipse(x: EllipseArgs["x"], y: EllipseArgs["y"], width: EllipseArgs["width"], height: EllipseArgs["height"], args?: Partial): GlyphRenderer; hbar(args: Partial): GlyphRenderer; hbar(y: HBarArgs["y"], height: HBarArgs["height"], right: HBarArgs["right"], left: HBarArgs["left"], args?: Partial): GlyphRenderer; hex_tile(args: Partial): GlyphRenderer; hex_tile(q: HexTileArgs["q"], r: HexTileArgs["r"], args?: Partial): GlyphRenderer; image(args: Partial): GlyphRenderer; image(image: ImageArgs["image"], x: ImageArgs["x"], y: ImageArgs["y"], dw: ImageArgs["dw"], dh: ImageArgs["dh"], args?: Partial): GlyphRenderer; image_rgba(args: Partial): GlyphRenderer; image_rgba(image: ImageRGBAArgs["image"], x: ImageRGBAArgs["x"], y: ImageRGBAArgs["y"], dw: ImageRGBAArgs["dw"], dh: ImageRGBAArgs["dh"], args?: Partial): GlyphRenderer; image_url(args: Partial): GlyphRenderer; image_url(url: ImageURLArgs["url"], x: ImageURLArgs["x"], y: ImageURLArgs["y"], w: ImageURLArgs["w"], h: ImageURLArgs["h"], args?: Partial): GlyphRenderer; line(args: Partial): GlyphRenderer; line(x: LineArgs["x"], y: LineArgs["y"], args?: Partial): GlyphRenderer; multi_line(args: Partial): GlyphRenderer; multi_line(xs: MultiLineArgs["xs"], ys: MultiLineArgs["ys"], args?: Partial): GlyphRenderer; multi_polygons(args: Partial): GlyphRenderer; multi_polygons(xs: MultiPolygonsArgs["xs"], ys: MultiPolygonsArgs["ys"], args?: Partial): GlyphRenderer; oval(args: Partial): GlyphRenderer; oval(x: OvalArgs["x"], y: OvalArgs["y"], width: OvalArgs["width"], height: OvalArgs["height"], args?: Partial): GlyphRenderer; patch(args: Partial): GlyphRenderer; patch(x: PatchArgs["x"], y: PatchArgs["y"], args?: Partial): GlyphRenderer; patches(args: Partial): GlyphRenderer; patches(xs: PatchesArgs["xs"], ys: PatchesArgs["ys"], args?: Partial): GlyphRenderer; quad(args: Partial): GlyphRenderer; quad(left: QuadArgs["left"], right: QuadArgs["right"], bottom: QuadArgs["bottom"], top: QuadArgs["top"], args?: Partial): GlyphRenderer; quadratic(args: Partial): GlyphRenderer; quadratic(x0: QuadraticArgs["x0"], y0: QuadraticArgs["y0"], x1: QuadraticArgs["x1"], y1: QuadraticArgs["y1"], cx: QuadraticArgs["cx"], cy: QuadraticArgs["cy"], args?: Partial): GlyphRenderer; ray(args: Partial): GlyphRenderer; ray(x: RayArgs["x"], y: RayArgs["y"], length: RayArgs["length"], args?: Partial): GlyphRenderer; rect(args: Partial): GlyphRenderer; rect(x: RectArgs["x"], y: RectArgs["y"], width: RectArgs["width"], height: RectArgs["height"], args?: Partial): GlyphRenderer; segment(args: Partial): GlyphRenderer; segment(x0: SegmentArgs["x0"], y0: SegmentArgs["y0"], x1: SegmentArgs["x1"], y1: SegmentArgs["y1"], args?: Partial): GlyphRenderer; step(args: Partial): GlyphRenderer; step(x: StepArgs["x"], y: StepArgs["y"], mode: StepArgs["mode"], args?: Partial): GlyphRenderer; text(args: Partial): GlyphRenderer; text(x: TextArgs["x"], y: TextArgs["y"], text: TextArgs["text"], args?: Partial): GlyphRenderer; vbar(args: Partial): GlyphRenderer; vbar(x: VBarArgs["x"], width: VBarArgs["width"], top: VBarArgs["top"], bottom: VBarArgs["bottom"], args?: Partial): GlyphRenderer; wedge(args: Partial): GlyphRenderer; wedge(x: WedgeArgs["x"], y: WedgeArgs["y"], radius: WedgeArgs["radius"], start_angle: WedgeArgs["start_angle"], end_angle: WedgeArgs["end_angle"], args?: Partial): GlyphRenderer; asterisk(args: Partial): GlyphRenderer; asterisk(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; circle_cross(args: Partial): GlyphRenderer; circle_cross(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; circle_x(args: Partial): GlyphRenderer; circle_x(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; cross(args: Partial): GlyphRenderer; cross(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; dash(args: Partial): GlyphRenderer; dash(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; diamond(args: Partial): GlyphRenderer; diamond(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; diamond_cross(args: Partial): GlyphRenderer; diamond_cross(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; inverted_triangle(args: Partial): GlyphRenderer; inverted_triangle(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; square(args: Partial): GlyphRenderer; square(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; square_cross(args: Partial): GlyphRenderer; square_cross(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; square_x(args: Partial): GlyphRenderer; square_x(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; triangle(args: Partial): GlyphRenderer; triangle(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; x(args: Partial): GlyphRenderer; x(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; scatter(args: Partial): GlyphRenderer; scatter(x: MarkerArgs["x"], y: MarkerArgs["y"], args?: Partial): GlyphRenderer; _pop_colors_and_alpha(cls: Class, attrs: Attrs, prefix?: string, default_color?: Color, default_alpha?: number): Attrs; _find_uniq_name(data: Data, name: string): string; _fixup_values(cls: Class, data: Data, attrs: Attrs): void; _glyph(cls: Class, params_string: string, args: unknown[]): GlyphRenderer; _marker(cls: Class, args: unknown[]): GlyphRenderer; static _get_range(range?: Range | [number, number] | string[]): Range; static _get_scale(range_input: Range, axis_type: AxisType): Scale; _process_axis_and_grid(axis_type: AxisType, axis_location: Location, minor_ticks: number | "auto" | undefined, axis_label: string, rng: Range, dim: 0 | 1): void; _get_axis_class(axis_type: AxisType, range: Range): Class | null; _get_num_minor_ticks(axis_class: Class, num_minor_ticks?: number | "auto"): number; _process_tools(tools: (Tool | string)[] | string): Tool[]; _process_legend(legend: string | Vector | undefined, source: ColumnarDataSource): Vector | null; _update_legend(legend_item_label: Vector, glyph_renderer: GlyphRenderer): void; } export declare function figure(attributes?: Partial): Figure; export declare function show(obj: LayoutDOM, target?: HTMLElement | string): Promise; export declare function show(obj: LayoutDOM[], target?: HTMLElement | string): Promise;