ASPxClientXYDiagram2D.ShowCrosshair(screenX, screenY) Method

Shows the Crosshair Cursor at the point with the specified coordinates.

Declaration

ShowCrosshair(
    screenX: number,
    screenY: number
): void

Parameters

Name Type Description
screenX number

The horizontal coordinate that is related to the top-left angle of the chart.

screenY number

The vertical coordinate that is related to the top-left angle of the chart.

Example

To programmatically show the Crosshair Cursor on the client side, call the ASPxClientXYDiagram2D.ShowCrosshair method and specify the mouse position coordinates as this method’s parameters.

View Example

function OnChartObjectSelectionChanged(s, e) {
    var x = e.absoluteX - e.htmlElement.offsetLeft;
    var y = e.absoluteY - e.htmlElement.offsetTop;
    var xyDiagram = s.GetChart().diagram;
    xyDiagram.ShowCrosshair(x, y);
    e.processOnServer = false;
}
See Also