[]
Represents a collection of all IDataLabel objects for a series.
Each IDataLabel object represents the data label for a point or trendline. For a series without definable points, such as an area series, the collection contains a single data label.
You can use this collection to configure label display settings for the entire series and to access individual data labels. entire series and to access individual data labels.
public interface IDataLabels : IEnumerable<IDataLabel>, IEnumerable
Public Interface IDataLabels
Inherits IEnumerable(Of IDataLabel), IEnumerable
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);
IDataLabels dataLabels = chart.SeriesCollection[0].DataLabels;
dataLabels.ShowValue = true;
| Name | Description |
|---|---|
| AutoText | Gets or sets whether the data labels automatically generate text based on their current context.
When this property is |
| Count | Gets the number of IDataLabel objects in the collection. This property returns the number of data labels for the current series. For a series without definable points, the collection can contain a single data label. |
| Direction | Gets or sets the text direction of the data labels. Use this property to determine how the data label text is oriented, such as horizontal, vertical, or rotated layout. |
| Font | Gets the IFontFormat object for the data labels. Use the returned IFontFormat object to read or modify the font applied to the data label text for the series. |
| Format | Gets the IChartFormat object for the data labels. Use the returned object to access fill, line, and other formatting settings that apply to the data labels of the series. |
| this[int] | Gets a single IDataLabel object from the collection by index. Use this property to access an individual data label in the data labels collection for a series. |
| LeaderLines | Gets the leader lines for the data labels. Use the returned IChartLines object to access or modify the formatting of the leader lines associated with the data labels. |
| NumberFormat | Gets or sets the number format code for the data labels.
When the number format is linked to the source cells, the returned format code
reflects the linked cell format. If no custom format code is available, this method
returns |
| NumberFormatLinked | Gets or sets whether the data label number format is linked to the source cells.
When this property is |
| Orientation | Gets or sets the text orientation. Use this property to retrieve the current rotation angle applied to the data label text. |
| Parent | Gets the parent ISeries that contains this data labels collection. Use this property to access the series that owns the current data labels. |
| Position | Gets or sets the position of the data labels. Use this property to determine how the data labels in the series are positioned relative to their chart elements. |
| Separator | Gets or sets the separator used between parts of the data label text on a chart. This separator is used when the data labels display multiple elements, such as the series name and value. |
| ShowBubbleSize | Gets or sets whether the bubble size is displayed in the data labels for the series. This property is typically used with bubble charts to control whether each data label includes the bubble size value. |
| ShowCategoryName | Gets or sets whether the category name is displayed in the data labels for the series.
When this property is |
| ShowLeaderLines | Gets or sets whether leader lines are displayed for the data labels. Leader lines connect data labels to their corresponding data points when the labels are positioned away from the series. |
| ShowLegendKey | Gets or sets whether legend keys are displayed in the data labels.
When this property is |
| ShowPercentage | Gets or sets whether percentage values are displayed in the data labels. Use this property to determine whether the data labels for the series are configured to show percentage values. |
| ShowSeriesName | Gets or sets whether the series name is displayed in the data labels. This property determines whether the name of the associated series is shown for the data labels on the chart series. |
| ShowValue | Gets or sets whether the data labels display the values of their associated chart points.
When this property is |