PercentValueFormatting Property
See Also 
Xceed.Chart.Core Assembly > Xceed.Chart.Core Namespace > Series Class : PercentValueFormatting Property


Gives you access to the ValueFormatting object controlling the formatting of the percent values.

Syntax

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;}

Example

The following code displays the pie data labels in the following format: (percent) of (total).
C#Copy Code
pie.DataLabels.Format = "&lt;percent&gt; of &lt;total&gt;"
' 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 = "&lt;percent&gt; of &lt;total&gt;";
// 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";

Remarks

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.

Requirements

Target Platforms: Windows 2000, Windows XP SP3 Family, Windows Server 2003-2008 Family, Windows Vista, Windows 7

See Also