UNPKG

victory-voronoi-container

Version:

Interactive Voronoi Mouseover Component for Victory

108 lines 3.9 kB
import React from "react"; import { VictoryContainerProps, PaddingProps, VictoryEventHandler } from "victory-core"; export interface VictoryVoronoiContainerProps extends VictoryContainerProps { activateData?: boolean; activateLabels?: boolean; disable?: boolean; labels?: (point: any, index?: number, points?: any[]) => string; labelComponent?: React.ReactElement; mouseFollowTooltips?: boolean; onActivated?: (points: any[], props: VictoryVoronoiContainerProps) => void; onDeactivated?: (points: any[], props: VictoryVoronoiContainerProps) => void; radius?: number; voronoiBlacklist?: (string | RegExp)[]; voronoiDimension?: "x" | "y"; voronoiPadding?: PaddingProps; horizontal?: boolean; } export declare const VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS: { activateData: boolean; activateLabels: boolean; labelComponent: JSX.Element; voronoiPadding: number; }; export declare const useVictoryVoronoiContainer: (initialProps: VictoryVoronoiContainerProps) => { props: { mousePosition: { x: number; y: number; }; activePoints: any[]; activateData: boolean; activateLabels: boolean; disable?: boolean; labels?: (point: any, index?: number, points?: any[]) => string; labelComponent: JSX.Element; mouseFollowTooltips?: boolean; onActivated?: (points: any[], props: VictoryVoronoiContainerProps) => void; onDeactivated?: (points: any[], props: VictoryVoronoiContainerProps) => void; radius?: number; voronoiBlacklist?: (string | RegExp)[]; voronoiDimension?: "x" | "y"; voronoiPadding: PaddingProps; horizontal?: boolean; "aria-describedby"?: string; "aria-labelledby"?: string; children?: React.ReactElement | React.ReactElement[]; className?: string; containerId?: number | string; containerRef?: React.Ref<HTMLElement>; desc?: string; events?: React.DOMAttributes<any>; height?: number; name?: string; origin?: import("victory-core").OriginType; polar?: boolean; portalComponent?: React.ReactElement; portalZIndex?: number; preserveAspectRatio?: string; responsive?: boolean; role?: string; scale?: { x?: import("victory-core").D3Scale; y?: import("victory-core").D3Scale; }; style?: React.CSSProperties; tabIndex?: number; theme?: import("victory-core").VictoryThemeDefinition; title?: string; width?: number; ouiaId?: number | string; ouiaSafe?: boolean; ouiaType?: string; }; children: React.ReactElement[]; }; export declare const VictoryVoronoiContainer: { (initialProps: VictoryVoronoiContainerProps): JSX.Element; role: string; defaultEvents(initialProps: VictoryVoronoiContainerProps): ({ target: string; eventHandlers: { onMouseLeave: VictoryEventHandler; onTouchCancel: VictoryEventHandler; onMouseMove: VictoryEventHandler; onTouchMove: VictoryEventHandler; onMouseOver?: undefined; onMouseOut?: undefined; }; } | { target: string; eventHandlers: { onMouseLeave?: undefined; onTouchCancel?: undefined; onMouseMove?: undefined; onTouchMove?: undefined; onMouseOver?: undefined; onMouseOut?: undefined; } | { onMouseOver: () => null; onMouseOut: () => null; onMouseMove: () => null; onMouseLeave?: undefined; onTouchCancel?: undefined; onTouchMove?: undefined; }; })[]; }; //# sourceMappingURL=victory-voronoi-container.d.ts.map