ASPxClientXYDiagram2D.PointToDiagram(x, y) Method

Converts the display coordinates into a diagram coordinates object.

Declaration

PointToDiagram(
    x: number,
    y: number
): ASPxClientDiagramCoordinates

Parameters

Name Type Description
x number

An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart).

y number

An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart).

Returns

Type Description
ASPxClientDiagramCoordinates

An ASPxClientDiagramCoordinates object, containing information about the point’s argument and value, their scale types, associated axes and pane.

Remarks

Use the PointToDiagram method, to convert screen coordinates of a point to the diagram coordinates (measured in axis units). For example, this allows you to determine what series or series point is being clicked by an end-user, and perform the required actions accordingly.

NOTE

This method works only if the WebChartControl.EnableClientSidePointToDiagram property is set to true. And, if you don’t need to convert display coordinates into diagram coordinates on the client side, leave the EnableClientSidePointToDiagram property disabled, to reduce the amount of the server-client traffic.

For the opposite conversion (of diagram coordinates to screen coordinates), use the ASPxClientXYDiagram2D.DiagramToPoint method (with an overload appropriate to your axes’ scale types).

With the Radar and Polar diagram types, use the similar ASPxClientRadarDiagram.PointToDiagram and ASPxClientRadarDiagram.DiagramToPoint methods.

For more information, see the following documents.

See Also