NumericOptions.Format Property

Gets or sets a value that specifies the formatting applied to numeric values.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v19.2.dll

Declaration

public NumericFormat Format { get; set; }
Public Property Format As NumericFormat

Property Value

Type Description
NumericFormat

A NumericFormat enumeration value.

Remarks

Use the Format property, to define the appropriate format for numeric values representation in the axis labels, series point labels or in legend.

For example, the following image demonstrates the currency formatting applied to series points values, expressed by the $ sign added to the values.

CreateAPieChart_5

For more information on using this property, refer to Axis Scale Types.

Examples

This example demonstrates how to make series point labels of a pie chart show their values as percentages.

Note that to achieve this at runtime, you should cast the series' SeriesBase.PointOptions to the PiePointOptions type.

// Make the series points' values to be displayed as percents.
((PiePointOptions)series1.PointOptions).PercentOptions.ValueAsPercent = true;
((PiePointOptions)series1.PointOptions).ValueNumericOptions.Format = NumericFormat.Percent;
((PiePointOptions)series1.PointOptions).ValueNumericOptions.Precision = 0;
See Also