ComponentOne Chart 8.0 for ActiveX
Converting Pixel Coordinates to Data Coordinates

 

Converting Pixel Coordinates to Data Coordinates

To convert from pixel coordinates to data coordinates, call CoordToDataCoord. For example, the following converts the pixel coordinates (225, 92) to their equivalent data coordinates:

Dim DataX As Double

Dim DataY As Double

Dim DataZ As Double

Dim Region As Integer

...

With Chart3D1.ChartGroups(1)

       Region = CoordToDataCoord 225, 92, DataX, DataY, DataZ

End With

' DataX, DataY and DataZ now contain the data coordinate value

CoordToDataCoord returns, as its return value, the region of the chart in which the pixel coordinates are located. This region is represented as a region constant.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback