Version

CreateAdapter Method

Factory method for creating IChartData implementations.
Syntax
'Declaration
 
Public Shared Function CreateAdapter( _
   ByVal data As Object, _
   ByVal dataMember As String, _
   ByVal cm As BindingManagerBase, _
   ByVal relationName As String _
) As IChartData
public static IChartData CreateAdapter( 
   object data,
   string dataMember,
   BindingManagerBase cm,
   string relationName
)

Parameters

data
The data source (DataTable, DataView, ICollection or string filename).
dataMember
The name of a DataTable in the DataSource for charting.
cm
Identity of a CurrencyManager to use when binding and staying current with the DataSource.
relationName
Name of the relation.

Return Value

An ChartDataAdapter that can be used as an IChartData implementation.
Remarks

Please see the IChartData interface for more information.

An adapter can be automatically generated for an XML document represented in a string filename provided as the data argument. The following must be true:

The filename must exist on the file system, end in ".xml".
The account under which the application is running must have permission to read the file.
The XML document must contain an embedded, strongly-typed schema.
It must be a conformant XmlDataDocument, with msdata:IsDataSet attribute set to true.

This method can also furnish an adapter when data is a System.IO.StreamReader containing comma-separated values (CSV).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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