Quantcast
Viewing all articles
Browse latest Browse all 7205

How to display values both as real values and as percentages in a Pie chart's legend

This example demonstrates how you can force a pie chart's legend to display point values both as percentages and as real values.

First, make sure that the Series.LegendPointOptions.PercentOptions.ValueAsPercent property is enabled. Then, set the Series.LegendPointOptions.PointView property to Values. And, handle the chart's CustomDrawSeriesPoint event in the way shown in this example.

A related tutorial can be found in our online documentation at How to: Show Values as Percents in the Legend of a Pie Chart.

UPDATE: In the latest version it is possible to remove the CustomDrawSeriesPoint event handler and specify a required pattern using the Series -> LegendTextPattern property.

Question Comments

Added By: Kin Ng at: 6/20/2012 5:45:53 AM    

How could I have the same result using Xpf.Charts.PieSeries?

Added By: Alex (DevExpress Support) at: 11/17/2015 4:06:41 AM    It is possible to accomplish this task in ChartControl for WPF by adjusting the Series.LegendTextPattern property.

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>