DataLabel

DataLabel class

Represents a series labels.

public class DataLabel : IDataLabel

Constructors

Name Description
DataLabel(IChartDataPoint) Creates a new instance of DataLabel class.

Properties

Name Description
ActualHeight { get; } Specifies actual height of the chart element. Call method IChart.ValidateChartLayout() before to get actual values. Read Single.
ActualWidth { get; } Specifies actual width of the chart element. Call method IChart.ValidateChartLayout() before to get actual values. Read Single.
ActualX { get; } Specifies actual x location (left) of the chart element relative to the left top corner of the chart. Call method IChart.ValidateChartLayout() before to get actual values. Read Single.
ActualY { get; } Specifies actual top of the chart element relative to the left top corner of the chart. Call method IChart.ValidateChartLayout() before to get actual values. Read Single.
Bottom { get; } Bottom. Read-only Single.
Chart { get; } Returns the parent chart. Read-only IChart.
DataLabelFormat { get; } Returns data label format. Read-only IDataLabelFormat.
Height { get; set; } Returns or sets the height of a title as a fraction of the height of the chart. Read/write Single.
IsVisible { get; } False means that data label is not visible (and so all Show*-flags (ShowValue, …) are false). Read-only Boolean.
Right { get; } Right. Read-only Single.
TextFormat { get; } Returns text format. Read-only IChartTextFormat.
TextFrameForOverriding { get; } Can contain a rich formatted text. If this property is not null then this formatted text value overrides auto-generated text of data label. Auto-generated text of data label means text that is managed by ShowSeriesName, ShowValue, … properties and is formatted with the TextFormatManager.TextFormat property. Read-only ITextFrame.
ValueFromCell { get; set; } Gets or sets workbook data cell. Applied if IDataLabelFormat.ShowLabelValueFromCell property equals true.
Width { get; set; } Returns or sets the width of a title as a fraction of the width of the chart. Read/write Single.
X { get; set; } Returns or sets the x coordinate of a title as a fraction of the width of the chart. Read/write Single.
Y { get; set; } Returns or sets the y coordinate of a title as a fraction of the height of the chart. Read/write Single.

Methods

Name Description
AddTextFrameForOverriding(string) Initialize TextFrameForOverriding with the text in paramener “text”. If TextFrameForOverriding is already initialized then simply changes its text.
GetActualLabelText() Returns actual label text based on DataLabelFormat settings or TextFrameForOverriding.Text value.
Hide() Make data label hidden by setting all Show*-flags (ShowValue, …) to false state. IsVisible will be false after this.

See Also