Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / Series Class / PercentValueFormatting Property
Example


In This Topic
    PercentValueFormatting Property
    In This Topic
    Gives you access to the ValueFormatting object controlling the formatting of the percent values.
    Syntax
    'Declaration
     
    <CategoryAttribute("Formatting")>
    <DescriptionAttribute("Controls the percent value format")>
    Public Property PercentValueFormatting As ValueFormatting
    'Usage
     
    Dim instance As Series
    Dim value As ValueFormatting
     
    instance.PercentValueFormatting = value
     
    value = instance.PercentValueFormatting
    [Category("Formatting")]
    [Description("Controls the percent value format")]
    public ValueFormatting PercentValueFormatting {get; set;}
    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.
    Example
    The following code displays the pie data labels in the following format: (percent) of (total).
    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"
    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";
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also