Back to Devexpress

NumericOptions.Format Property

wpf-devexpress-dot-xpf-dot-charts-dot-numericoptions-3a59c982.md

latest5.1 KB
Original Source

NumericOptions.Format Property

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

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

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

Property Value

TypeDescription
NumericFormat

A NumericFormat enumeration value.

|

Available values:

NameDescription
General

Displays numbers without any specific formatting applied to them. Integer and fractional parts are separated using the decimal symbol specified in your computer’s regional settings.

Example: 100.

| | Scientific |

Displays numbers using standard scientific notation. This format is determined by your computer’s regional settings.

Example: 1.00E+002.

| | FixedPoint |

Displays numbers as real numeric values with the specified number of decimal places. The number of decimal places is specified by the NumericOptions.Precision property, and the decimal separator is based upon your computer’s regional settings.

Example: 100.00.

| | Currency |

Displays numbers as currency, using the currency format specified in your computer’s regional settings.

Example: $100.

| | Percent |

Displays numbers multiplied by 100 with a percent sign (%) appended to the right; displays two digits to the right of the symbol specified in your computer’s regional settings.

Example: 100 %.

| | Number |

Displays numbers as numeric values, using the number format specified in your computer’s regional settings.

Example: 100.00.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Format
PointOptions

.ArgumentNumericOptions .Format

| | PointOptions |

.ValueNumericOptions .Format

|

Remarks

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

Example

This example demonstrates how to customize the PointOptions.ValueNumericOptions and PercentOptions properties.

xaml
<dxc:AreaFullStackedSeries2D.PointOptions>
    <dxc:PointOptions>
        <dxc:PointOptions.ValueNumericOptions>
            <dxc:NumericOptions Format="Percent" Precision="2" />
        </dxc:PointOptions.ValueNumericOptions>
        <dxc:AreaFullStackedSeries2D.PercentOptions>
            <dxc:PercentOptions PercentageAccuracy="3" />
        </dxc:AreaFullStackedSeries2D.PercentOptions>
    </dxc:PointOptions>
</dxc:AreaFullStackedSeries2D.PointOptions>

The following code snippets (auto-collected from DevExpress Examples) contain references to the Format property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-display-chart-control-in-grid-details/CS/WpfApplication19/MainWindow.xaml#L27

xml
<dxc:PointOptions.ValueNumericOptions>
    <dxc:NumericOptions Format="Percent" Precision="0"/>
</dxc:PointOptions.ValueNumericOptions>

wpf-data-grid-create-master-detail-grid-in-code/CS/MasterDetailInCode/MainWindow.xaml#L24

xml
<dxc:PointOptions.ValueNumericOptions>
    <dxc:NumericOptions Format="Percent" Precision="0"/>
</dxc:PointOptions.ValueNumericOptions>

See Also

NumericOptions Class

NumericOptions Members

DevExpress.Xpf.Charts Namespace