DataSourceName Property

Microsoft Office Web Components Visual Basic

expression.DataSourceName

expression    Required. An expression that returns a ChartSpace object.

Example

This example establishes PivotTable1 as the data source for Chartspace1 and then displays the field list so that the user can add data to the chart.

Sub ConnectChart()

   ' Bind ChartSpace1 to PivotTable1.
   Chartspace1.DataSourceName = "PivotTable1"

   ' Display the field list.
   Chartspace1.DisplayFieldList = True

End Sub