Skip to main content
All docs
V24.2

DxRangeSelectorScale.ValueType Property

Specifies the data type of the Range Selector’s scale. Casts values from the assigned data source to the target type if required.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public ChartAxisDataType ValueType { get; set; }

Property Value

Type Description
ChartAxisDataType

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 DxRangeSelectorChart component determines the type of scale values based on the value type specified in the corresponding data source field. For instance, if a data source stores data points as numeric values, scale values are also numeric.

You may need to change the type values specified in the data source, for instance, when the assigned data source stores dates or numbers as strings. Use the scale’s ValueType property the scale value type. Additionally, you can use the Type property to specify the scale type.

The following code snippet sets the scale type to Continuous and casts values specified as strings to the DateTime type:

<DxRangeSelector Width="1100px"
                 Height="200px"
                 SelectedRangeStartValue="@("02/01/2024")"
                 SelectedRangeEndValue="@("02/14/2024")">
    <DxRangeSelectorScale StartValue="@("01/01/2024")"
                          EndValue="@("06/01/2024")"
                          TickInterval="ChartAxisInterval.Week"
                          MinorTickInterval="ChartAxisInterval.Day"
                          MinRange="ChartAxisInterval.Week"
                          MaxRange="ChartAxisInterval.Month"
                          ValueType="ChartAxisDataType.DateTime"
                          Type="ChartAxisType.Continuous">
        <DxRangeSelectorScaleMarker>
            <DxRangeSelectorScaleMarkerLabel>
                <DxTextFormatSettings Type="TextFormat.MonthAndYear" />
            </DxRangeSelectorScaleMarkerLabel>
        </DxRangeSelectorScaleMarker>
    </DxRangeSelectorScale>
    <DxRangeSelectorSliderMarker>
        <DxTextFormatSettings Type="TextFormat.MonthAndDay" />
    </DxRangeSelectorSliderMarker>
</DxRangeSelector>
See Also