PercentOptions.ValueAsPercent Property

Gets or sets a value that specifies whether point values are presented as a percentage.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

public bool ValueAsPercent { get; set; }
Public Property ValueAsPercent As Boolean

Property Value

Type Description
Boolean

true if point values are presented as a percentage; false if they are represented as is.

Property Paths

You can access this nested property as listed below:

Object Type Path to ValueAsPercent
FullStackedAreaPointOptions
.PercentOptions.ValueAsPercent
FullStackedBarPointOptions
.PercentOptions.ValueAsPercent
FullStackedLinePointOptions
.PercentOptions.ValueAsPercent
FullStackedPointOptions
.PercentOptions.ValueAsPercent
FunnelPointOptions
.PercentOptions.ValueAsPercent
PiePointOptions
.PercentOptions.ValueAsPercent
SimplePointOptions
.PercentOptions.ValueAsPercent

Remarks

Use the ValueAsPercent property to control whether the data values of a series' data points are presented as percentages, for the series view types represented by the SimpleDiagram class.

By default, this property is set to true, and the values of the data points within a series are shown as percents. This means that the value displayed for each point, is its value expressed as a percentage of the total of all the values in the series.

If you need to indicate data points by their real values, set the ValueAsPercent property to false.

The precision of percentage values can be specified by the PercentOptions.PercentageAccuracy property, in effect when the ValueAsPercent is set to true.

NOTE

In order to display percentages, you can set the NumericOptions.Format property to the NumericFormat.Percent value.

The following images illustrate how the ValueAsPercent property works.

ValueAsPercent = false,

NumericOptions.Format=NumericFormat.General

ValueAsPercent = true,

NumericOptions.Format=NumericFormat.Percent

ValueAsPercent_False

ValueAsPercent_True

Examples

The following code demonstrates how to disable the PercentOptions.ValueAsPercent property for Pie charts, which is true, by default.

((PiePointOptions)series1.Label.PointOptions).PercentOptions.ValueAsPercent = false;
See Also