Overview
XYCursor creates an interactive cursor for XY charts, displaying crosshairs and managing tooltips for data items.Settings
Cursor’s X axis.If set, cursor will snap to that axis’ cells.
Cursor’s Y axis.If set, cursor will snap to that axis’ cells.
What should cursor do when dragged across plot area.
zoomX- Zoom horizontallyzoomY- Zoom verticallyzoomXY- Zoom both directionsselectX- Select horizontallyselectY- Select verticallyselectXY- Select both directionsnone- No interaction
Cursor’s horizontal position relative to plot area (0 to 1).If this setting is set, cursor will not react to mouse/touch and will just sit at specified position until
positionX is reset to undefined.0 - left, 1 - right.Cursor’s vertical position relative to plot area (0 to 1).If this setting is set, cursor will not react to mouse/touch and will just sit at specified position until
positionY is reset to undefined.0 - top, 1 - bottom.If set to
true, cursor will not be hidden when mouse cursor moves out of the plot area.A list of series to snap cursor to.If set, the cursor will always snap to the closest data item of listed series.
Defines in which direction to look when searching for the nearest data item to snap to.
xy- Check both X and Y distance (default)x- Check only horizontal distancey- Check only vertical distancex!- Snap to exact X positiony!- Snap to exact Y position
An array of other XYCursor objects to sync this cursor with.If set will automatically move synced cursors to the same position within their respective axes.See documentation
Minimum distance in pixels between down and up points.If a distance is less than the value of
moveThreshold, the zoom or selection won’t happen.Properties
A Grid element that is used for horizontal line of the cursor crosshair.
A Grid element that is used for vertical line of the cursor crosshair.
An element that represents current selection.
A chart cursor is attached to.
Methods
handleMove()
skipEvent parameter is set to true, the move will not invoke the "cursormoved" event.
X/Y coordinates to move cursor to
Do not fire “cursormoved” event
Original pointer event
updateCursor()
Events
Kicks in when cursor selection starts.Only when
behavior is set to a selection mode.Kicks in when cursor selection ends.Only when
behavior is set to a selection mode.Invoked if pointer is pressed down on a plot area and released without moving (only when behavior is
"selectX").Kicks in when cursor’s position over plot area changes.
Kicks in when cursor is hidden when user rolls-out of the plot area.