[]
Specifies where a chart data label is positioned.
Use this enumeration with Position or Position to control the placement of data labels for chart points or an entire series.
public enum DataLabelPosition
Public Enum DataLabelPosition
worksheet.Range["A1:B3"].Value = new object[,] {
{"Name", "Value"},
{"A", 10},
{"B", 20}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, worksheet.Range["D1:H8"]).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B3"], RowCol.Columns, true, true);
chart.SeriesCollection[0].DataLabels.Position = DataLabelPosition.OutsideEnd;
| Name | Description |
|---|---|
| Above | Specifies that the data label is positioned above the data point. |
| Below | Specifies that the data label is positioned below the data point. |
| BestFit | Specifies the best position for the data label. |
| Center | Specifies that the data label is centered on the data point or is inside a bar or pie chart. |
| InsideBase | Specifies that the data label is positioned inside the data point at the bottom edge. |
| InsideEnd | Specifies that the data label is positioned inside the data point at the top edge. |
| Left | Specifies that the data label is positioned to the left of the data point. |
| OutsideEnd | Specifies that the data label is positioned outside the data point at the top edge. |
| Right | Specifies that the data label is positioned to the right of the data point. |