Xceed Chart for WinForms v4.4 Documentation
DataBindingManager Property (ChartControl)
Example 


Xceed.Chart.v4.4 Assembly > Xceed.Chart Namespace > ChartControl Class : DataBindingManager Property
Controls the database integration of the chart control.
Syntax
'Declaration
 
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)>
<DescriptionAttribute("Controls the database integration of the chart control")>
<CategoryAttribute("Xceed Chart for .NET")>
Public ReadOnly Property DataBindingManager As DataBindingManager
'Usage
 
Dim instance As ChartControl
Dim value As DataBindingManager
 
value = instance.DataBindingManager
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Description("Controls the database integration of the chart control")]
[Category("Xceed Chart for .NET")]
public DataBindingManager DataBindingManager {get;}
Example
The following example bind a chart series to an OleDbDataAdapter.
...

' add data source to chart control
Dim index As Integer = ChartControl.DataBindingManager.AddDataSource(oleDbDataAdapter1)

' set data source index
chart.DataSourceIndex = index

 ' get chart series
Dim bar As BarSeries = CType(chart.Series(0), BarSeries)

' data series "Values" is bind to column name "values"
bar.Values.ColumnName = "values"
bar.Values.IsBind = True

' data series "Labels" is bind to column name "colors"
bar.Labels.ColumnName = "colors"
bar.Labels.IsBind = True

' data series "FillEffects" is bind to column name "colors"
bar.Appearance.FillEffects.ColumnName = "colors"
bar.Appearance.FillEffects.IsBind = True

ChartControl.UpdateFromDataSources()
...

// add data source to chart control
int index = ChartControl.DataBindingManager.AddDataSource(oleDbDataAdapter1);

// set data source index
chart.DataSourceIndex = index;

// get chart series
BarSeries bar = (BarSeries)chart.Series[0];

// data series "Values" is bind to column name "values"
bar.Values.ColumnName = "values";
bar.Values.IsBind = true;

// data series "Labels" is bind to column name "colors"
bar.Labels.ColumnName = "colors";
bar.Labels.IsBind = true;

// data series "FillEffects" is bind to column name "colors"
bar.Appearance.FillEffects.ColumnName = "colors";
bar.Appearance.FillEffects.IsBind = true;

ChartControl.UpdateFromDataSources();
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ChartControl Class
ChartControl Members