Skip to main content

ChartElementFormat Class

Lists formats applied to axis and series labels.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll

Declaration

[JsonConverter(typeof(FormatJsonConverter))]
public sealed class ChartElementFormat

Remarks

Use the ChartElementFormat class to specify an axis and series label’s format. The class contains properties for date-time formats and methods for numeric formats. You can also define a custom format based on the LDML standard.

In the following example, the Chart component applies the Month and Day format to the argument axis. The value axis uses the Decimal number format.

<DxChart Data="@forecasts">
    <DxChartArgumentAxis>
        <DxChartAxisLabel Format="ChartElementFormat.MonthAndDay"></DxChartAxisLabel>
        <DxChartAxisTitle Text="Date"></DxChartAxisTitle>
    </DxChartArgumentAxis>
    <DxChartValueAxis>
        <DxChartAxisLabel Format="ChartElementFormat.Decimal()"></DxChartAxisLabel>
        <DxChartAxisTitle Text="Temperature, C"></DxChartAxisTitle>
    </DxChartValueAxis>
    @* ... *@
</DxChart>

Axes format example

Run Demo: Charts - Axes

Inheritance

Object
ChartElementFormat
See Also