DataItemNumericFormat.Unit Property
Gets or sets the unit to which numeric values should be converted.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v24.2.Core.dll
NuGet Package: DevExpress.Dashboard.Core
#Declaration
[DefaultValue(DataItemNumericUnit.Auto)]
public DataItemNumericUnit Unit { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Data |
Auto | A Data |
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. |
Millions | Values are converted to millions. 123,456,789 -> 123. |
Billions | Values are converted to billions. 12,345,678,901 -> 12. |
#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.