Skip to main content
All docs
V24.1

DxPolarChartValueAxis.ValueType 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 ValueType { 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 values specified in the data source, for instance, when the assigned data source stores dates or numbers as strings. Use DxPolarChartArgumentAxis.ArgumentType and DxPolarChartValueAxis.ArgumentType properties to specify the desired type for axis values. Additionally, you can use the DxChartAxisBase.Type property to specify the type of an axis itself.

The following code snippet casts values specified as strings to the Numeric 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>
    <DxPolarChartValueAxis ValueType="ChartAxisDataType.Numeric" />
    <DxChartLegend Visible="false" />
</DxPolarChart>

Cast string to Numeric axis values

See Also