Position Property

Microsoft Office Web Components Object Model

Show All

Position Property

       

Returns or sets the position of the object.

ChartAxisPositionEnum can be one of these ChartAxisPositionEnum constants.
chAxisPositionBottom
chAxisPositionCategory
chAxisPositionCircular
chAxisPositionLeft
chAxisPositionPrimary
chAxisPositionRadial
chAxisPositionRight
chAxisPositionSecondary
chAxisPositionSeries
chAxisPositionTimescale
chAxisPositionTop
chAxisPositionValue
ChartDataLabelPositionEnum can be one of these ChartDataLabelPositionEnum constants.
chLabelPositionAutomatic
chLabelPositionBottom
chLabelPositionCenter
chLabelPositionInsideBase
chLabelPositionInsideEnd
chLabelPositionLeft
chLabelPositionOutsideBase
chLabelPositionOutsideEnd
chLabelPositionRight
chLabelPositionTop
ChartLegendPositionEnum can be one of these ChartLegendPositionEnum constants.
chLegendPositionAutomatic
chLegendPositionBottom
chLegendPositionLeft
chLegendPositionRight
chLegendPositionTop
ChartTitlePositionEnum can be one of these ChartTitlePositionEnum constants.
chTitlePositionAutomatic
chTitlePositionBottom
chTitlePositionLeft
chTitlePositionRight
chTitlePositionTop
 

expression.Position

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

This example puts the legend for the specified chart to the left of the plot area.

Sub AddLegend()

   Dim chConstants

   Set chConstants = ChartSpace1.Constants

   ' Enbable the legend for the first chart in Chartspace1.
   ChartSpace1.Charts(0).HasLegend = True

   ' Set the position of the legend.
   ChartSpace1.Charts(0).Legend.Position = chConstants.chLegendPositionLeft

End Sub