ComponentOne 3D Chart for WinForms
3D Chart End-User Interaction / Returning Coordinate Values / Determining Coordinate Values
In This Topic
    Determining Coordinate Values
    In This Topic

    To determine the pixel coordinates of a given data point, call the DataIndexToCoord method. For example, the following code obtains the pixel coordinates of the point in the second row and third column:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim PixelX, PixelY As Integer
    C1Chart3D1.ChartGroups(0).ChartData.DataIndexToCoord(2, 1, PixelX, PixelY)
    ' PixelX and PixelY now contain the pixel coordinate value.
    

    To write code in C#

    C#
    Copy Code
    int PixelX=0, PixelY=0;
    C1Chart3D1.ChartGroups[0].ChartData.DataIndexToCoord(2,1,ref PixelX,ref PixelY);
    // PixelX and PixelY now contain the pixel coordinate value.
    
    See Also