Converting Data Points into Pixel Coordinates

The two methods that convert either data coordinates or data indices into pixel coordinates are the DataIndexToCoord and DataCoordToCoord methods of the ChartGroup object. The DataIndexToCoord method takes a series and point index and returns the client coordinates of the specified data point. The DataCoordToCoord method takes a set of data coordinates and returns a pixel coordinate. These methods are quite similar to the other conversion methods. 

DataIndexToCoord Method

The DataIndexToCoord method takes four parameters, and returns a pixel coordinate as seen in the following example:

      Visual Basic

      C#

DataCoordToCoord Method

The DataCoordToCoord method takes four parameters, and returns a pixel coordinate as seen in the following example:

      Visual Basic

      C#

 Sample Project Available

For a complete sample using the DataCoordToCoord method, see the PropGrid or the FExplorer samples located on http://helpcentral.componentone.com/Samples.aspx.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.