Provide Series Data

  • 4 minutes to read

The Chart3DControl can display multiple series against three-dimensional data. At least three values are required to create a point in the 3D Chart. To visualize data, the chart uses three axes: x-axis, y-axis, and z-axis.

This help topic contains the following sections:

Supported Data Types

You can use the following data types for X and Y arguments:

The Chart3DControl determines the type of arguments based on underlying data. You can explicitly specify the Series3DBase.XArgumentScaleType and Series3DBase.YArgumentScaleType properties to prevent the chart from automatic type detection.

The 3D Chart only supports numeric values that are plotted on the value axis (z-axis).

Create Series Automatically from a Template

Use the following XAML to create several series from a data source:

<dxc:Chart3DControl>
    <dxc:Series3DDataSourceAdapter DataSource="{Binding Irises}"
                                   SeriesDataMember="Species"
                                   XArgumentDataMember="SepalLength"
                                   YArgumentDataMember="PetalLength"
                                   ValueDataMember="SepalWidth">
        <dxc:Series3DDataSourceAdapter.SeriesTemplate>
            <dxc:Series3DTemplate>
                <dxc:Series3DTemplate.View>
                    <dxc:Point3DSeriesView/>
                </dxc:Series3DTemplate.View>
            </dxc:Series3DTemplate>
        </dxc:Series3DDataSourceAdapter.SeriesTemplate>
    </dxc:Series3DDataSourceAdapter>
</dxc:Chart3DControl>

Related API members:

Member Description
Chart3DControl.SeriesSource The Chart3D control's series source. (Content property)
Series3DDataSourceAdapter Generates series from a data source based on a SeriesDataMember's values.
Series3DDataSourceAdapter.SeriesTemplate The series template.

To fine-tune specific generated series, use the Series3DDataSourceAdapter.CustomizeSeries event.

Create Series Manually

Use the following XAML to create series and add them to a series storage:

<dxc:Chart3DControl>
    <dxc:Series3DStorage>
        <dxc:Series3D/>
        <dxc:Series3D/>
        <!--...-->
    </dxc:Series3DStorage>
</dxc:Chart3DControl>

Related API members:

Member Description
Chart3DControl.SeriesSource The Chart3D control's series source. (Content property)
Series3DStorage The storage of manually created series.
Series3D An individual series.

Create a Series Manually with Unbound Point Data

The series storage allows you to create and configure series points manually if you do not have a data source of arguments and values. The following XAML demonstrates this approach:

<dxc:Series3D DisplayName="GDP by Year">
    <dxc:SeriesPoint3DStorage>
        <dxc:SeriesPoint3D XArgument="USA" YArgument="1/1/2014" Value="17348"/>
        <!--Other points.-->
    </dxc:SeriesPoint3DStorage >
</dxc:Series3D >

Related API members:

Member Description
Series3D.PointSource The source of series' points. (Content property)
SeriesPoint3DStorage The storage of manually created points.
SeriesPoint3DStorage.Points The collection of manually created points. (Content property)
SeriesPoint3D An individual series point.
SeriesPoint3D.XArgument Specifies the series point's x-argument.
SeriesPoint3D.YArgument Specifies the series point's y-argument.
SeriesPoint3D.Value Specifies the series point's value.

Create Series Manually and Generate Points from a Data Source

Use the following XAML to populate a series with points generated from an external source:

<dxc:Series3D DisplayName="Population Statistics">
    <dxc:SeriesPoint3DDataSourceAdapter DataSource="{Binding Countries}"
                                        XArgumentDataMember="Name"
                                        YArgumentDataMember="Year"
                                        ValueDataMember="Population"/>
</dxc:Series3D >

Related API members:

Member Description
Series3D.PointSource The source of series' points. (Content property)
SeriesPoint3DDataSourceAdapter Generates series points based on the specified data source's values.
SeriesPoint3DDataSourceAdapter.DataSource The source whose values are used to generate series points.
SeriesPoint3DDataSourceAdapter.XArgumentDataMember The name of the data member whose values are used as point x-arguments.
SeriesPoint3DDataSourceAdapter.YArgumentDataMember The name of the data member whose values are used as point y-arguments.
SeriesPoint3DDataSourceAdapter.ValueDataMember The name of the data member whose values are used as point values.

Create Series Manually with Points from Argument and Value Arrays

You can use separate data arrays or collections as a source of arguments and values:

<dxc:Series3D DisplayName="Population Statistics">
    <dxc:SeriesPoint3DMatrixAdapter XArguments="{Binding CountryNames}"
                                    YArguments="{Binding Years}"
                                    Values="{Binding Populations}"/>
</dxc:Series3D >

Related API members:

Member Description
Series3D.PointSource The source of series' points. (Content property)
SeriesPoint3DMatrixAdapter Creates series points by the specified arguments and values.
SeriesPoint3DMatrixAdapter.XArguments Specifies a source of x-arguments.
SeriesPoint3DMatrixAdapter.YArguments Specifies a source of y-arguments.
SeriesPoint3DMatrixAdapter.Values Specifies a source of values.

The Chart3DControl uses the following principle to create points: for each x-argument, all y-arguments and values (the number of required values is equal to the number of y-arguments) are fetched from collections. Use the SeriesPoint3DMatrixAdapter.IsCorrectDimension property to check whether the value collection contains the required number of values to plot the chart.