| Visual Basic (Declaration) | |
|---|---|
<DescriptionAttribute("Controls the percent value format")> <CategoryAttribute("Formatting")> Public Property PercentValueFormatting As ValueFormatting | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Series Dim value As ValueFormatting instance.PercentValueFormatting = value value = instance.PercentValueFormatting | |
| C# | |
|---|---|
[DescriptionAttribute("Controls the percent value format")] [CategoryAttribute("Formatting")] public ValueFormatting PercentValueFormatting {get; set;} | |
The following code displays the pie data labels in the following format: (percent) of (total).
| C# | Copy Code |
|---|---|
pie.DataLabels.Format = "<percent> of <total>" ' format the percent command as percent and the total with 3 decimal places pie.PercentValueFormat.Format = ValueFormat.Percentage pie.TotalValueFormat.Format = ValueFormat.Custom pie.TotalValueFormat.CustomFormat = "0.000" | |
| C# | Copy Code |
|---|---|
pie.DataLabels.Format = "<percent> of <total>"; // format the percent command as percent and the total with 3 decimal places pie.PercentValueFormat.Format = ValueFormat.Percentage; pie.TotalValueFormat.Format = ValueFormat.Custom; pie.TotalValueFormat.CustomFormat = "0.000"; | |
The percent value formatting command is represented in the formatting strings
as <percent>. It represents the percentage of the current data point value to the total value.
Target Platforms: Windows 2000, Windows XP SP3 Family, Windows Server 2003-2008 Family, Windows Vista, Windows 7
Copy Code