Skip to main content

DataMember.ScaleType Property

Specifies the scale type of data in a column.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v21.2.dll

Declaration

public ScaleType ScaleType { get; set; }

Property Value

Type Description
ScaleType

A ScaleType object.

Available values:

Name Description
Auto

A scale type is detected automatically based on the type of underlying data. This means that numerical data will be treated as numerical, date-time data as date-time, qualitative as qualitative values.

Numerical

Identifies the Numerical data scale. This means that data provided for the DataPointCollection.Points will be treated as numerical values, and will be shown on the axis as numbers (e.g., 100, 200, and 300).

DateTime

Identifies the DateTime data scale. This means that data provided for the DataPointCollection.Points will be treated as DateTime values, and will be shown on the axis as DateTime values (e.g., January, 2003, January, 2004, and January, 2005).

Qualitative

Identifies the Qualitative data scale. This means that data provided for the DataPointCollection.Points will be treated as qualitative values, and will be shown on the axis as textual representations (e.g., A, B, and C).

Remarks

For more information, refer to Providing Data.

Example

The following example demonstrates how to bind a chart to data provided by a ViewModel.

To do this, it is necessary to assign the DataSourceAdapter object to the Series.Data property and specify the datasource for the adapter via its DataSourceAdapter.DataSource property.

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Charts="using:DevExpress.WinUI.Charts"
    xmlns:local="using:BindChart"
    x:Class="BindChart.MainWindow"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

        <Charts:CartesianChart>
            <Charts:Series>
                <Charts:Series.View>
                    <Charts:LineSeriesView/>
                </Charts:Series.View>
                <Charts:Series.Data>
                    <Charts:DataSourceAdapter DataSource="{Binding ItemsSource}">
                        <Charts:DataMember DataMemberType="Argument" ColumnName="PointArgument" 
                                           ScaleType="DateTime"/>
                        <Charts:DataMember DataMemberType="Value" ColumnName="PointValue" 
                                           ScaleType="Auto"/>
                    </Charts:DataSourceAdapter>
                </Charts:Series.Data>
            </Charts:Series>
            <Charts:CartesianChart.AxisX>
                <Charts:AxisX DateTimeGridAlignment="Year" DateTimeMeasureUnit="Hour">
                    <Charts:AxisX.LabelOptions>
                        <Charts:AxisLabelOptions Pattern="{}{V:yyyy}"/>
                    </Charts:AxisX.LabelOptions>
                </Charts:AxisX>
            </Charts:CartesianChart.AxisX>
        </Charts:CartesianChart>
    </Grid>
</Window>
See Also