| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- import type { TooltipStyleProps } from '@antv/gui';
- import { BBox, InteractionComponent } from '../runtime';
- import { FisheyeCoordinate } from './coordinateTransform';
- import { TooltipItemValue } from './component';
- export type Interaction = ElementHighlightInteraction | ElementHighlightByColorInteraction | ElementHighlightByXInteraction | ElementSelectByColorInteraction | ElementSelectByXInteraction | ElementSelectInteraction | TooltipInteraction | FisheyeInteraction | ChartIndexInteraction | CustomInteraction | LegendFilterInteraction | LegendHighlightInteraction | BrushHighlightInteraction | BrushXHighlightInteraction | BrushYHighlightInteraction | BrushAxisHighlightInteraction | BrushFilterInteraction | BrushYFilterInteraction | BrushXFilterInteraction | SliderFilterInteraction | PoptipInteraction;
- export type InteractionTypes = 'elementHighlight' | 'elementHighlightByX' | 'elementHighlightByColor' | 'fisheye' | 'chartIndex' | 'elementSelect' | 'elementSelectByX' | 'elementSelectByColor' | 'fisheye' | 'tooltip' | 'legendFilter' | 'legendHighlight' | 'brushXHighlight' | 'brushYHighlight' | 'brushHighlight' | 'brushFilter' | 'brushXFilter' | 'brushYFilter' | 'sliderFilter' | 'poptip' | InteractionComponent;
- export type BrushHighlightInteraction = {
- type?: 'brushHighlight';
- brushKey?: string;
- reverse?: boolean;
- series?: boolean;
- facet?: boolean;
- } & Record<`${'mask'}${any}`, any>;
- export type BrushXHighlightInteraction = {
- type?: 'brushXHighlight';
- brushKey?: string;
- reverse?: boolean;
- series?: boolean;
- facet?: boolean;
- } & Record<`${'mask'}${any}`, any>;
- export type BrushYHighlightInteraction = {
- type?: 'brushYHighlight';
- brushKey?: string;
- reverse?: boolean;
- series?: boolean;
- facet?: boolean;
- } & Record<`${'mask'}${any}`, any>;
- export type BrushAxisHighlightInteraction = {
- type?: 'brushAxisHighlight';
- reverse?: boolean;
- brushKey?: string;
- } & Record<`${'mask'}${any}`, any>;
- export type BrushFilterInteraction = {
- type?: 'brushFilter';
- reverse?: boolean;
- } & Record<`${'mask'}${any}`, any>;
- export type BrushXFilterInteraction = {
- type?: 'brushXFilter';
- reverse?: boolean;
- } & Record<`${'mask'}${any}`, any>;
- export type BrushYFilterInteraction = {
- type?: 'brushYFilter';
- reverse?: boolean;
- } & Record<`${'mask'}${any}`, any>;
- export type ElementHighlightInteraction = {
- type?: 'elementHighlight';
- link?: boolean;
- background?: boolean;
- offset?: number;
- } & Record<`${'link' | 'background'}${any}`, any>;
- export type ElementSelectInteraction = {
- type?: 'elementSelect';
- single?: boolean;
- background?: boolean;
- offset?: number;
- } & Record<`${'link' | 'background'}${any}`, any>;
- export type ElementSelectByColorInteraction = {
- type?: 'elementSelectByColor';
- single?: boolean;
- offset?: number;
- background?: boolean;
- } & Record<`${'link' | 'background'}${any}`, any>;
- export type ElementSelectByXInteraction = {
- type?: 'elementSelectByX';
- single?: boolean;
- background?: boolean;
- offset?: number;
- } & Record<`${'link' | 'background'}${any}`, any>;
- export type ElementHighlightByXInteraction = {
- type?: 'elementHighlightByX';
- link?: boolean;
- background?: boolean;
- offset?: number;
- } & Record<`${'link' | 'background'}${any}`, any>;
- export type ElementHighlightByColorInteraction = {
- type?: 'elementHighlightByColor';
- color?: string;
- background?: boolean;
- link?: boolean;
- offset?: number;
- } & Record<`${'link' | 'background'}${any}`, any>;
- export type PoptipInteraction = {
- type?: 'poptip';
- offsetX?: number;
- offsetY?: number;
- } & Record<`tip${any}`, any>;
- export type LegendFilterInteraction = {
- type?: 'legendFilter';
- };
- export type LegendHighlightInteraction = {
- type?: 'legendHighlight';
- };
- export type ChartIndexInteraction = {
- type?: 'chartIndex';
- wait?: number;
- leading?: boolean;
- trailing?: boolean;
- } & Record<`${'rule' | 'label'}${any}`, any>;
- export type SliderFilterInteraction = {
- type?: 'sliderFilter';
- wait?: number;
- leading?: boolean;
- trailing?: boolean;
- };
- export type TooltipInteraction = {
- type?: 'tooltip';
- shared?: boolean;
- series?: boolean;
- facet?: boolean;
- body?: boolean;
- crosshairs?: boolean;
- groupName?: boolean;
- position?: TooltipStyleProps['position'];
- bounding?: BBox;
- mount?: string | HTMLElement;
- sort?: (d: TooltipItemValue) => any;
- filter?: (d: TooltipItemValue) => any;
- render?: (event: any, // @todo
- options: {
- title: 'string';
- items: TooltipItemValue[];
- }) => HTMLElement | string;
- style?: Record<`crosshairs${any}`, any>;
- };
- export type FisheyeInteraction = {
- type?: 'fisheye';
- wait?: number;
- leading?: boolean;
- trailing?: boolean;
- } & Omit<FisheyeCoordinate, 'type'>;
- export type CustomInteraction = {
- type?: InteractionComponent;
- [key: string]: any;
- };
|