Series3DDataSourceAdapter Class
The source of series bound to a data source.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v18.2.dll
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. |
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-automatically-generate-series-t461372.
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
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Series3DDataSourceAdapter class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.