Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Providing Data
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]General
    [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]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap 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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Show Currency Values in the Legend of a Pie Chart

The following tutorial demonstrates how to change the default percentage format of point values in the legend to currency and show both argument and values using a Pie chart as an example.

To display both point arguments and values, and show values as currency in the legend, do the following.

  1. Select the series in the chart's diagram, and locate the SeriesBase.LegendTextPattern property in the Properties window.

  2. You can assign a pattern to the SeriesBase.LegendTextPattern property either doing it directly, using the Chart wizard (this method is not considered in the example), or via a Pattern Editor.

    This editor simplifies text customization of legend items.

    Note

    The customization of legend items works when the SeriesViewColorEachSupportBase.ColorEach mode is enabled (the ColorEach is always enabled, by default, for Pie, Doughnut and Nested Doughnut charts).

  3. To invoke the Pattern Editor, click the ellipsis button of the SeriesBase.LegendTextPattern property.

  4. Add the Argument and Value placeholders to the 'Pattern:' column. To do this, double click the corresponding items in the 'Placeholders:' column, sequentially.

  5. To apply the currency format to point values in the legend:

    • 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.

      Note

      The preliminary result of applying this format is shown in the preview at the bottom of the 'Pattern:' column.

    • click OK to close the editor.
  6. Finally, let's add a colon separator between Argument and Value placeholders in our pattern. The next step shows how to do this directly in the Properties window.

  7. Locate the SeriesBase.LegendTextPattern property in the Properties window.

  8. Change the applied '{A}{V:$0}' pattern string to '{A}:{V:$0}' .

The result is shown in the following image.

Expanded See Also

How would you rate this topic?​​​​​​​