DataLabelFormat.NumberFormat property

Represents the format string for the DataLabels object. Read/write String.

public string NumberFormat { get; set; }


If parent of this DataLabelFormat object is a DataLabelCollection collection of data labels, then this property gets or sets the default value of the NumberFormat property for the new data labels in the DataLabelCollection collection. When this property is set with a value, that value is also set for the NumberFormat property for all data labels in the DataLabelCollection collection (i.e. “DataLabels.DefaultDataLabelFormat.NumberFormat = val;” causes all DataLabels[i].NumberFormat to equal to val).


series.Labels.DefaultDataLabelFormat.ShowValue = true;
series.Labels.DefaultDataLabelFormat.IsNumberFormatLinkedToSource = false;
series.Labels.DefaultDataLabelFormat.NumberFormat = "0.0%";

See Also