Position Property

Applies To

DataLabel object, DataLabels collection object, Legend object.

Description

Returns or sets the position of the specified object, as shown in the following table. Read/write Long.

Object

Position

DataLabel, DataLabels

The position of the data label. Can be one of the following XlDataLabelPosition constants: xlLabelPositionAbove, xlLabelPositionBelow, xlLabelPositionBestFit, xlLabelPositionCenter, xlLabelPositionCustom, xlLabelPositionInsideBase, xlLabelPositionInsideEnd, xlLabelPositionLeft, xlLabelPositionMixed, xlLabelPositionOutsideEnd, or xlLabelPositionRight.

Legend

The position of the legend on the chart. Can be one of the following XlLegendPosition constants: xlLegendPositionBottom, xlLegendPositionCorner, xlLegendPositionLeft, xlLegendPositionRight, or xlLegendPositionTop.


Example

This example sets the position of the legend to the top of the chart.

myChart.Legend.Position = xlLegendPositionTop