Skip to main content
A newer version of this page is available. .

ChartElementFormat.FromLdmlString(String) Method

Sets a custom format for Chart labels.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

The label format.

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 a date, MMMMM — the first letter of the month, yy — the last two digits of the year:

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

Formatted string

See Also