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.FromLdmlString(String) Method

Sets a custom format for chart labels.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public static ChartElementFormat FromLdmlString(
    string ldmlString
)

#Parameters

Name Type Description
ldmlString String

An LDML string that specifies a custom label format.

#Returns

Type Description
ChartElementFormat

A ChartElementFormat enumeration value.

#Remarks

Use the FromLdmlString method to specify a custom label format for date-time and numeric values. You can use this method for axis and series labels.

In the following code snippet, the formatting pattern is dd M yy, where dd is the day, MMMMM is the first letter of the month, and yy is the last two digits of the year:

Razor
<DxChart Data="@forecasts">
    <DxChartArgumentAxis>
        <DxChartAxisLabel Format='ChartElementFormat.FromLdmlString("d MMMMM yy")'></DxChartAxisLabel>
    </DxChartArgumentAxis>
    @* ... *@
</DxChart>

Formatted string

See Also