Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ChartElementFormat Class

Lists formats applied to axis and series labels.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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.

Razor
<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