DxChartAxisLabel.Format Property
Specifies the display format for axis labels.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public ChartAxisLabelFormat Format { get; set; }
Property Value
Type | Description |
---|---|
ChartAxisLabelFormat | A value format for numeric and date-time axes. |
Available values:
Name | Description |
---|---|
Billions | Displays numbers as billions (1 000 000 000.11 → 1B). |
Currency | Adds a currency symbol to a number (3.95 → $3.95). |
Day | Displays a current day (for example, 01). |
Decimal | Displays a decimal number (100.11 → 100). |
Exponential | Displays a number in exponential notation (1 000 → 1E+3). |
FixedPoint | Displays a number with a fixed point. |
LargeNumber | Uses “Thousands”, “Millions”, “Billions”, or “Trillions” format depending on the actual value. |
LongDate | Displays a date in the dddd, MMMM dd, yyyy format (for example, Thursday, January 01, 1970). |
LongTime | Displays a time value in the hh:mm:ss format (for example, 12:00:00 AM). |
Millions | Displays numbers as millions (1 000 000.11 → 1M). |
Millisecond | Displays milliseconds (for example, 010). |
Month | Displays months (for example, January). |
MonthAndDay | Displays a date in the MMMM dd format (for example, January 01). |
MonthAndYear | Displays a date in the yyyy MMMM format (for example, 1970 January) |
Percent | Displays numbers as percentile values (for example, 0.1 → 10%). |
Quarter | Displays a quarter of the year for a date (for example, QI). |
QuarterAndYear | Displays a quarter and year (for example, QI 1970). |
ShortDate | Displays a date in the m/dd/yyyy format (for example, 1/25/1970 AM). |
ShortTime | Displays time in the hh:mm format (for example, “12:00 AM”). |
Thousands | Displays numbers as thousands (1 000.11 → 1K). |
Trillions | Displays numbers as trillions (1 000 000 000 000 → 1T). |
Year | Displays years (for example, 1970). |
DayOfWeek | Displays a day of the week (for example, Thursday). |
Hour | Displays hours (for example, 12). |
LongDateLongTime | Displays a date-time value in the dddd, MMMM dd, yyyy, hh:mm:ss format (for example, Thursday, January 01, 1970, 12:00:00 AM). |
Minute | Displays time in minutes (for example, 00). |
Second | Displays seconds (for example, 00). |
ShortDateShortTime | Displays a date in the m/dd/yyyy, hh:mm format (for example, 1/25/1970, 12:00 AM). |
Default | Label values are not formatted. |
Remarks
The following code formats a value axis’s labels:
<DxChartValueAxis>
<DxChartAxisLabel Format="ChartAxisLabelFormat.Decimal"></DxChartAxisLabel>
</DxChartValueAxis>
You can use the following built-in formats. To be in effect, an applied format should be compatible with the axis type.
Numeric Formats
- FixedPoint - 100.11 → 100
- Percent - 0.1 → 10%
- Decimal - 100.11 → 100
- Exponential - 1 000 → 1E+3
- Thousands - 1 000.11 → 1K
- Millions - 1 000 000.11 → 1M
- Billions - 1 000 000 000.11 → 1B
- Trillions - 1 000 000 000 000 → 1T
- LargeNumber - Uses “Thousands”, “Millions”, “Billions”, or “Trillions” format depending on the actual value.
Currency Formats
- Currency - “$3.95”
Date-Time Formats
- LongDate - “Thursday, January 01, 1970”
- LongTime - “12:00:00 AM”
- LongDateLongTime - “Thursday, January 01, 1970, 12:00:00 AM”
- MonthAndDay - “January 01”
- MonthAndYear - “1970 January”
- QuarterAndYear - “QI 1970”
- ShortDate - “1/25/1970”
- ShortTime - “12:00 AM”
- ShortDateShortTime - “1/25/1970, 12:00 AM”
- Millisecond - “010”
- Second - “00”
- Minute - “00”
- Hour - “12”
- Day - “01”
- DayOfWeek - “Thursday”
- Month - “January”
- Quarter - “QI”
- Year - “1970”