To convert from pixel coordinates to data coordinates, call the CoordToDataCoord method. For example, the following converts the pixel coordinates (225, 92) to their equivalent data coordinates:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim DataX As Double Dim DataY As Double Dim DataZ As Double C1Chart3D1.ChartGroups(0).ChartData._CoordToDataCoord(225, 92, DataX, DataY, DataZ) ' DataX, DataY and DataZ now contain the data coordinate value. |
To write code in C#
C# |
Copy Code
|
---|---|
double DataX=0, DataY=0, DataZ=0; C1Chart3D1.ChartGroups[0].ChartData.CoordToDataCoord(225, 92, ref DataX, ref DataY, ref DataZ); // DataX, DataY and DataZ now contain the data coordinate value. |
CoordToDataCoord returns False if there is no data corresponding these pixel coordinates.