.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

DataLabelBase.LabelPosition Property

Gets or sets the position of data labels on the chart.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v21.2.Core.dll


DataLabelPosition LabelPosition { get; set; }

Property Value

Type Description

A DataLabelPosition enumeration value specifying the data label placement.


The example below demonstrates how to create the clustered column chart and display its data labels by setting the DataLabelBase.ShowValue property to true. To specify the location of data labels on the chart, use the DataLabelBase.LabelPosition property. In this example, the DataLabelPosition.Center value is used, so data labels will be displayed centered inside columns.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask3")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet("B2:D4"))
chart.TopLeftCell = worksheet.Cells("H2")
chart.BottomRightCell = worksheet.Cells("N14")

' Display data labels and specify their position within the chart.
chart.Views(0).DataLabels.ShowValue = True
chart.Views(0).DataLabels.LabelPosition = DataLabelPosition.Center
See Also