UNPKG

@visactor/vgrammar-core

Version:

VGrammar is a visual grammar library

57 lines (56 loc) 3.41 kB
import type { IPointLike } from '@visactor/vutils'; import type { CircleCrosshairAttrs, LineCrosshairAttrs, PolygonCrosshairAttrs, RectCrosshairAttrs, SectorCrosshairAttrs } from '@visactor/vrender-components'; import { CircleCrosshair, LineCrosshair, PolygonCrosshair, RectCrosshair, SectorCrosshair } from '@visactor/vrender-components'; import type { CrosshairOptions, CrosshairType, IGroupMark, ITheme, IView, InteractionEvent, RecursivePartial } from '../types'; import { BaseInteraction } from './base'; import { CrosshairEnum } from '../graph/enums'; import type { IBaseScale } from '@visactor/vscale'; type CrosshairComponent = CircleCrosshair | LineCrosshair | PolygonCrosshair | RectCrosshair | SectorCrosshair; export declare const generateLineCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: { width: number; height: number; }, config: any, theme?: ITheme, addition?: RecursivePartial<LineCrosshairAttrs> & any) => LineCrosshairAttrs; export declare const generateRectCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: { width: number; height: number; }, config: any, theme?: ITheme, addition?: RecursivePartial<RectCrosshairAttrs>) => RectCrosshairAttrs; export declare const generateRingCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: { width: number; height: number; }, config: any, theme?: ITheme, addition?: RecursivePartial<SectorCrosshairAttrs>) => SectorCrosshairAttrs; export declare const generateSectorCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: { width: number; height: number; }, config: any, theme?: ITheme, addition?: RecursivePartial<SectorCrosshairAttrs>) => SectorCrosshairAttrs; export declare const generateCircleCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: { width: number; height: number; }, config: any, theme?: ITheme, addition?: RecursivePartial<CircleCrosshairAttrs>) => CircleCrosshairAttrs; export declare const generatePolygonCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: { width: number; height: number; }, config: any, theme?: ITheme, addition?: RecursivePartial<PolygonCrosshairAttrs>) => PolygonCrosshairAttrs; export declare class Crosshair extends BaseInteraction<CrosshairOptions> { static type: string; type: string; options: CrosshairOptions; static defaultOptions: Omit<CrosshairOptions, 'target'>; protected _crosshairComponent?: CrosshairComponent; protected _crosshairComponentType?: keyof typeof CrosshairEnum; protected _container: IGroupMark; constructor(view: IView, options?: CrosshairOptions); protected getEvents(): ({ type: import("../types").EventType; handler: (event: InteractionEvent) => void; } | { type: "none" | import("../types").EventType; handler: () => void; })[]; protected handleCrosshairShow: (event: InteractionEvent) => void; protected handleCrosshairHide: () => void; protected getCrosshairComponentType(): "lineCrosshair" | "rectCrosshair" | "sectorCrosshair" | "circleCrosshair" | "polygonCrosshair" | "ringCrosshair"; protected getDefaultCrosshairAttribute(): any; bind(): void; unbind(): void; } export {};