Skip to main content

Series3DDataSourceAdapter Class

The source of series bound to a data source.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v23.2.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

[Series3DSourceCustomBindingProperties]
public class Series3DDataSourceAdapter :
    Series3DSourceBase,
    ISeriesFactory,
    ISeriesPointFactory,
    ISeriesDataAdapter,
    IChartBindingProvider,
    IBindingProvider,
    IFilteredComponent,
    IFilteredComponentBase

Example

This example demonstrates how to automatically generate series. It visualizes the Iris Data Set obtained from the ics.uci.edu website.

This example uses the following classes and properties.

Class or Property Description
Chart3DControl.SeriesSource The series source of the Chart3D control.
Series3DDataSourceAdapter Converts data objects to series.
Series3DDataSourceAdapter.SeriesTemplate The template used to generate series.
Series3DTemplate The series template.
Series3DBase.View The view that will be used by all generated series.
Bubble3DSeriesView The 3D Bubbles series view.
Imports System
Imports System.Collections.ObjectModel
Imports System.Windows
Imports System.Windows.Resources
Imports System.Xml.Linq

Namespace Bubbles
    Public Class IrisesViewModel
        Public Property Irises() As ObservableCollection(Of IrisData)
        Public Sub New()
            Me.Irises = DataLoader.GetIrises("/Data/IrisDataSet.xml")
        End Sub
    End Class
    Friend NotInheritable Class DataLoader

        Private Sub New()
        End Sub

        Public Shared Function GetIrises(ByVal filepath As String) As ObservableCollection(Of IrisData)
            Dim irisDataSet As New ObservableCollection(Of IrisData)()
            Dim uri As New Uri(filepath, UriKind.RelativeOrAbsolute)
            Dim info As StreamResourceInfo = Application.GetResourceStream(uri)
            Dim document As XDocument = XDocument.Load(info.Stream)
            If document Is Nothing Then
                Return irisDataSet
            End If
            For Each element As XElement In document.Element("IrisDataSet").Elements()
                Dim sepalLength As Double = Convert.ToDouble(element.Element("SepalLength").Value)
                Dim sepalWidth As Double = Convert.ToDouble(element.Element("SepalWidth").Value)
                Dim petalLength As Double = Convert.ToDouble(element.Element("PetalLength").Value)
                Dim petalWidth As Double = Convert.ToDouble(element.Element("PetalWidth").Value)
                Dim species As String = element.Element("Species").Value.ToString()
                irisDataSet.Add(New IrisData(species, sepalWidth, sepalLength, petalWidth, petalLength))
            Next element
            Return irisDataSet
        End Function
    End Class
End Namespace

Inheritance

Object
DispatcherObject
DependencyObject
ContentElement
FrameworkContentElement
DXFrameworkContentElement
DevExpress.Xpf.Charts.Chart3DNonVisualElement
DevExpress.Xpf.Charts.Chart3DSourceBase
Series3DSourceBase
Series3DDataSourceAdapter
See Also