Skip to main content
All docs
V24.1

DxPolarChartArgumentAxis.ArgumentType Property

Specifies the data type of the argument axis. Casts values from the assigned data source to the target type if required.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(ChartAxisDataType.Auto)]
[Parameter]
public ChartAxisDataType ArgumentType { get; set; }

Property Value

Type Default Description
ChartAxisDataType Auto

An enumeration value.

Available values:

Name Description
Auto

Does not cast arguments/values and displays them on the axis of the applicable type (Continuous for integer and float data types and Discrete for other data types).

Numeric

Casts arguments/values to a numeric type and displays them on the Continuous axis. To parse strings successfully, the decimal separator should be ‘.’.

String

Casts arguments/values to the String type and displays them on the Discrete axis.

DateTime

Casts arguments/values to the DateTime type and displays them on the Continuous axis. To parse strings successfully, the value should match the ISO JavaScript Date pattern.

Remarks

The component determines the type of axis values based on the value type specified in the corresponding data source field of a series. For instance, if a data source stores data points as numeric values, axis values are also numeric.

You may need to change the type of arguments and values specified in the data source, for instance, when the assigned data source stores dates or numbers as strings. Use DxPolarChartArgumentAxis.ArgumentType and DxPolarChartValueAxis.ValueType properties to specify the axis value type. Additionally, you can use the DxChartAxisBase.Type property to specify the type of axes.

The following code snippet casts arguments specified as strings to the DateTime type:

@using System.Drawing

<DxPolarChart Data=@DataSource>
    <DxPolarChartBarSeries Name="Day"
                           Color="Color.Sienna"
                           ArgumentField="@((DiscretePoint i) => i.Arg)"
                           ValueField="@((DiscretePoint i) => i.Day)">
    </DxPolarChartBarSeries>
    <DxPolarChartBarSeries Name="Night"
                           Color="Color.MidnightBlue"
                           ArgumentField="@((DiscretePoint i) => i.Arg)"
                           ValueField="@((DiscretePoint i) => i.Night)">
    </DxPolarChartBarSeries>
    <DxPolarChartArgumentAxis ArgumentType="ChartAxisDataType.DateTime" />
    <DxChartLegend Visible="false" />
</DxPolarChart>

Cast string to DateTime axis values

See Also