/** @jsxImportSource react */ import { BoundedObject, BoundedObjectConfig, BoundedObjectInstance } from "../svg/BoundedObject"; import { Rect } from "../svg/util/Rect"; import { TooltipParentInstance, TooltipConfig } from "../widgets/overlay/tooltip-ops"; import { Selection } from "../ui/selection/Selection"; import { RenderingContext } from "../ui/RenderingContext"; import { NumberProp, BooleanProp, StringProp, StructuredProp, Prop } from "../ui/Prop"; import { Instance } from "../ui/Instance"; export interface MarkerConfig extends BoundedObjectConfig { /** The `x` value binding or expression. */ x?: Prop; /** The `y` value binding or expression. */ y?: Prop; /** Used to indicate if the data should affect axis span. */ affectsAxes?: boolean; /** Shape kind. `circle`, `square`, `triangle`, etc. */ shape?: StringProp; /** Disabled state. */ disabled?: BooleanProp; /** Index of a color from the standard palette of colors. 0-15. */ colorIndex?: NumberProp | StringProp; /** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */ colorMap?: StringProp; /** Name used to resolve the color. If not provided, `name` is used instead. */ colorName?: StringProp; /** Color index to use for the legend entry. */ legendColorIndex?: NumberProp; /** Name of the item as it will appear in the legend. */ name?: StringProp; /** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */ active?: BooleanProp; /** X offset. */ xOffset?: number; /** Y offset. */ yOffset?: number; /** Size of the shape in pixels. */ size?: NumberProp; /** * Name of the horizontal axis. The value should match one of the horizontal axes set * in the `axes` configuration of the parent `Chart` component. Default value is `x`. */ xAxis?: string; /** * Name of the vertical axis. The value should match one of the vertical axes set * in the `axes` configuration if the parent `Chart` component. Default value is `y`. */ yAxis?: string; /** Set to `true` to make the shape draggable along the X axis. */ draggableX?: boolean; /** Set to `true` to make the shape draggable along the Y axis. */ draggableY?: boolean; /** Set to `true` to make the shape draggable along the X and Y axis. */ draggable?: boolean; /** Constrain the marker position to min/max values of the X axis during drag operations. */ constrainX?: boolean; /** Constrain the marker position to min/max values of the Y axis during drag operations. */ constrainY?: boolean; /** When set to `true`, it is equivalent to setting `constrainX` and `constrainY` to true. */ constrain?: boolean; /** Name of the legend to be used. Default is `legend`. */ legend?: string; /** Action to perform on legend item click. Default is `auto`. */ legendAction?: string; /** Tooltip configuration. For more info see Tooltips. */ tooltip?: StringProp | StructuredProp; /** Set to true to hide the marker. The marker will still participate in axis range calculations. */ hidden?: boolean; /** Indicate that markers should be stacked horizontally. Default value is `false`. */ stackedX?: BooleanProp; /** Indicate that markers should be stacked vertically. Default value is `false`. */ stackedY?: BooleanProp; /** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */ stack?: StringProp; /** * Applies to rectangular shapes. The horizontal corner radius of the rect. Defaults to ry if ry is specified. * Value type: |; * If unit is not specified, it defaults to `px`. */ rx?: StringProp | NumberProp; /** * Applies to rectangular shapes. The vertical corner radius of the rect. Defaults to rx if rx is specified. * Value type: |; * If unit is not specified, it defaults to `px`. */ ry?: StringProp | NumberProp; /** Selection configuration. */ selection?: any; /** Click event handler. */ onClick?: (e: React.MouseEvent, instance: Instance) => void; } export interface MarkerInstance extends BoundedObjectInstance, TooltipParentInstance { axes: Record; xAxis: any; yAxis: any; colorMap: any; } export declare class Marker extends BoundedObject { baseClass: string; xAxis: string; yAxis: string; xOffset: number; yOffset: number; size: number; draggableX: boolean; draggableY: boolean; draggable: boolean; constrainX: boolean; constrainY: boolean; constrain: boolean; legend: string; legendAction: string; shape: string; hidden: boolean; affectsAxes: boolean; stackedY: boolean; stackedX: boolean; stack: string; selection: Selection; tooltip: TooltipConfig; onClick: MarkerConfig["onClick"]; constructor(config: MarkerConfig); init(): void; declareData(...args: any[]): void; prepareData(context: RenderingContext, instance: MarkerInstance): void; calculateBounds(context: RenderingContext, instance: MarkerInstance): Rect; explore(context: RenderingContext, instance: MarkerInstance): void; prepare(context: RenderingContext, instance: MarkerInstance): void; onLegendClick(e: MouseEvent, instance: MarkerInstance): void; render(context: RenderingContext, instance: MarkerInstance, key: string): React.ReactNode; handleMouseDown(e: React.MouseEvent | React.TouchEvent, instance: MarkerInstance): void; handleClick(e: React.MouseEvent, instance: MarkerInstance): void; handleDragMove(e: MouseEvent | TouchEvent, instance: MarkerInstance, captureData: any): void; } //# sourceMappingURL=Marker.d.ts.map