The following example shows how to create a 2D Line chart.
Create a ChartControl and set its ChartControl.Diagram property to an XYDiagram2D object.
Add a LineSeries2D object to the Diagram.Series collection.
Note that the
ChartControl.Diagram
andDiagram.Series
are content properties. You can declare series in XAML directly after a diagram's declaration without wrapping them in opening and closingChartControl.Diagram
andDiagram.Series
tags.
Use the following properties to bind the series to data:
- Series.DataSource - Specifies the series's data source.
- Series.ArgumentDataMember - Defines the data member that provides the series's arguments.
- Series.ValueDataMember - Specifies the data member that provides the series's values.
- Window1.xaml (VB: Window1.xaml)
- Window1.xaml.cs (VB: Window1.xaml.vb)
(you will be redirected to DevExpress.com to submit your response)