[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IDataLabel.Position

Position Property

Position

Gets or sets the position of the data label.

Use this property to determine how the current data label is positioned relative to its chart point or series element.

Declaration
DataLabelPosition Position { get; set; }
Property Position As DataLabelPosition
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Quarter", "Sales"},
    {"Q1", 10},
    {"Q2", 18},
    {"Q3", 14}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, true);
ISeries series = chart.SeriesCollection[0];
series.HasDataLabels = true;
series.DataLabels.Position = DataLabelPosition.Center;
IPoint point = series.Points[0];
point.HasDataLabel = true;
IDataLabel dataLabel = point.DataLabel;
dataLabel.Position = DataLabelPosition.OutsideEnd;
DataLabelPosition position = dataLabel.Position;