Back to Devexpress

ChartElementFormat.FromLdmlString(String) Method

blazor-devexpress-dot-blazor-dot-chartelementformat-dot-fromldmlstring-x28-system-dot-string-x29.md

latest1.9 KB
Original Source

ChartElementFormat.FromLdmlString(String) Method

Sets a custom format for chart labels.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public static ChartElementFormat FromLdmlString(
    string ldmlString
)

Parameters

NameTypeDescription
ldmlStringString

An LDML string that specifies a custom label format.

|

Returns

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

See Also

ChartElementFormat Class

ChartElementFormat Members

DevExpress.Blazor Namespace