Chart.DataBindTable Method

Creates and binds series data to the specified data table, and optionally populates multiple x-values.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Function DataBindTable ( _
    dataSource As IEnumerable, _
    xField As String _
) As Chart
'Usage
Dim instance As Chart 
Dim dataSource As IEnumerable 
Dim xField As String 
Dim returnValue As Chart 

returnValue = instance.DataBindTable(dataSource, _
    xField)
public Chart DataBindTable(
    IEnumerable dataSource,
    string xField
)
public:
Chart^ DataBindTable(
    IEnumerable^ dataSource, 
    String^ xField
)
member DataBindTable : 
        dataSource:IEnumerable * 
        xField:string -> Chart
public function DataBindTable(
    dataSource : IEnumerable, 
    xField : String
) : Chart

Parameters

  • xField
    Type: System.String
    The name of the table column used for the series x-values.

Return Value

Type: System.Web.Helpers.Chart
The chart.

Remarks

As an alternative to using the DataBindTable method, you can use the AddSeries method of the Chart class. The AddSeries method lets you set the xValue and yValues parameters.

See Also

Reference

Chart Class

System.Web.Helpers Namespace