[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Expand]Chart Elements
   [Expand]Providing Data
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
    [Collapse]Creating Charts
     [Expand]Providing Data
     [Collapse]Data Representation
       How to: Change the Display Format for Series Labels of a Pie Chart
       How to: Change the Display Format for Axis Labels
       How to: Change the Display Format for Axis Labels (Runtime Sample)
       How to: Show Currency Values in the Legend of a Pie Chart
       How to: Filter Data
       How to: Show N Top Points as a Single Section in a Pie Chart
       How to: Use Automatic Date-Time Scale Modes of an Axis
       How to: Obtain Values Calculated for Automatic Axis Date-Time Scale Modes
       How to: Create a Custom Summary Function
       How to: Exclude Weekends and Holidays from the Axis Scale
       How to: Specify the Appearance of the Pie Chart Using Its Pattern at Runtime
       How to: Display Qualitative Scale Values Sorted in a Custom Sort Order
       How to: Use Custom Measure Units in an Automatic Date-Time Scale Mode
       How to: Use Custom Measure Units in an Automatic Numeric Scale Mode
     [Expand]Appearance Customization
     [Expand]Series Views
    [Expand]Chart Elements
    [Expand]End-User Interaction
    [Expand]Producing Output
   [Expand]Additional Resources
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Change the Display Format for Series Labels of a Pie Chart

This tutorial demonstrates how to change the display format for Pie Chart series labels at design time to show both arguments and values as real values, and not percentages.

To change the display format of series labels, do the following.

  1. Create a simple unbound chart of the PieSeriesView type. Or, for an existing chart, change the view of its series to Pie.

    The following image demonstrates the points added to the Pie series (for more information, refer to Manually Add Points to a Series).

  2. After this step, the Pie chart will appear as follows (with its legend hidden).

    The next steps demonstrate how to customize the display format of pie series labels.

  3. By default, Pie series labels display their point values as percentages. To make them display real values, do the following.

    • Click the Pie series in the Chart control to select it.
    • In the Properties window, locate the SeriesLabelBase.TextPattern property and set its value to the "{V}" pattern.

    You can also specify this text pattern for series labels using the Pattern Editor or via the Chart Designer (this method is not illustrated in this example).

  4. To invoke the Pattern Editor, click the ellipsis button of the SeriesLabelBase.TextPattern property in the Properties window, as shown below.

  5. To specify the "{V}" pattern, double click the Value placeholder in the "Placeholders:" column of the Pattern Editor.

    The "{V}" pattern appears in the "Pattern:" column. To save this pattern, click OK. This closes the editor.

    After applying the pattern, the Pie series labels show real values.

    To display both arguments and values in series labels and apply the currency format to the point values, do the following:

  6. Invoke the Pattern Editor, as you did in the previous step.
  7. Select Currency from the "Format:" drop-down list and click the second format.

    This adds the format specifier to the "{V}" pattern in the "Pattern:" editor column.

    You can see the preliminary result of applying this format in the preview at the bottom of the "Pattern:" column.

  8. To add the Argument placeholder before the "{V:$0}" pattern, place the mouse cursor at the start line position in the "Pattern:" column. Then, double click Argument in the "Placeholders:" column.

  9. Finally, specify the colon separator after the "{A}" pattern in the "Pattern:" column.

    To apply the pattern, click OK.

The result is shown in the following image.

In addition, you can perform similar operations for the Pie chart's legend (e.g., to make it display values as percentages and show the arguments as well).

To learn how to do this, refer to How to: Show Currency Values in the Legend of a Pie Chart.

Expanded See Also

Is this topic helpful?​​​​​​​