Skip to main content

How to: Bind a Chart to Data from an MDB File

The following example demonstrates how to bind a DXCharts control to an MDB database.

To accomplish this, it is necessary to add a corresponding DataSet to a project, and set the Series.ArgumentScaleType, Series.ArgumentDataMember, Series.ValueScaleType and Series.ValueDataMember properties to the required values.

Then, in a code-behind the Window.Initialize method, you can obtain all data from a DataSet, using the data adapter’s GetData method, and assign this data to a series’ Series.DataSource property.

View Example

<Window x:Class="WpfApplication1.Window1" xmlns="" xmlns:x="" xmlns:dxc="" Title="Window1" Height="300" Width="396">
        <dxc:ChartControl Name="chartControl1">
                        <dxc:BarSideBySideSeries2D Name="carSeries" ArgumentDataMember="Model" ValueDataMember="Price" />