Object Reference > Chart2DDataCoordResult Object > Chart2DDataCoordResult Object Properties > Y Property (Chart2DDataCoordResult) |
Y Property (Chart2DDataCoordResult)
The Y-coordinate.
Property Y 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