DataItemNumericFormat.Unit Property
Gets or sets the unit to which numeric values should be converted.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v18.2.Core.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
DataItemNumericUnit | **Auto** | A DataItemNumericUnit enumeration member that specifies the unit to which numeric values should be converted. |
Available values:
Name | Description |
---|---|
Auto | The unit is selected automatically, so that there are no more than three digits in the resulting value’s integer part. |
Ones | Values are shown “as is”. |
Thousands | Values are converted to thousands. 1,234 -> 1.234K (in the en-US culture, provided that the DataItemNumericFormat.Precision is set to 3) |
Millions | Values are converted to millions. 123,456,789 -> 123.4M (in the en-US culture, provided that the DataItemNumericFormat.Precision is set to 1) |
Billions | Values are converted to billions. 12,345,678,901 -> 12.34B (in the en-US culture, provided that the DataItemNumericFormat.Precision is set to 2) |
Remarks
Use the Unit property to specify whether numeric values should be shown in thousands, millions, etc.
If the Unit property is set to DataItemNumericUnit.Auto, values are converted to a unit that is selected so that there are no more than three digits in the resulting value’s integer part. After that, values are rounded to contain no more than three significant digits.
Otherwise, values are first converted to the unit specified by the DataItemNumericFormat.Unit
property and then rounded according to the DataItemNumericFormat.Precision property value.