ComponentOne Chart 8.0 for ActiveX
X Property (Chart2DDataCoordResult)

 

X Property (Chart2DDataCoordResult)

The X-coordinate.

Syntax

Property X As Long

Example

' This example maps a pixel coordinate to a chart coordinate

' and adds a chart label to that point

 

' Declare Coordinate and Label objects

Dim Coordinates as Chart2DDataCoordResult

Dim Label as Object

 

' Determine the X and Y values for Coordinates

Coordinates = Chart2D1.ChartGroups(1).CoordToDataCoordObject(20,30)

 

' Add a chart label

Set Label = Chart2D1.ChartLabels.Add

 

' Assign the ChartLabel to the point picked by the

' CoordToDataCoordObject method

With Chart2D1.ChartGroups(1)

       .AttachMethod = oc2dAttachDataCoord

       .AttachDataCoord.X = Coordinates.X

       .AttachDataCoord.Y = Coordinates.Y

       .Text = "My Chart Label"

End With

See Also

Chart2DDataCoordResult Object

 

 


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

Product Support Forum  |  Documentation Feedback