Converts an axis value to a relative coordinate.
Visual Basic (Declaration) | |
---|---|
Public Function ValueToPosition( _ ByVal axisValue As Double _ ) As Double |
Visual Basic (Usage) | Copy Code |
---|---|
|
Parameters
- axisValue
- An axis value.
Return Value
The axis coordinate that corresponds to the specified axis value. This returned value is relative to the entire chart image.
This method returns a relative axis position from a given axis value. Note that the relative chart coordinate system has the top-left corner of the image at position (0,0) and the bottom-right corner of the chart image at position (100,100). For more information concerning the chart's coordinate system see the Chart Coordinate System topic.
If the axis scale is logarithmic then the value is converted so that it uses a linear scale.
If you need to determine a position for a given point in a 2D chart then this method must be called twice, once for each axis value that defines the point (e.g. X axis value of 5, Y axis value of 2.7).
The position returned by this method is relative to the entire chart image, and not to the ChartArea that the axis belongs to.
This method is useful for performing custom drawing for 3D charts. Custom drawing for 3D charts is performed by transforming Point3D objects, which use relative chart coordinates. For more information see the Working with 3D Charts topic.
GDI+ drawing methods use absolute pixel coordinates, so if custom drawing is being done for a 2D chart use the ValueToPixelPosition method instead.
This method only works in paint events.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family