The data contained in the data series of a DataSeriesCollection object can be exported to a DataTable object. This functionality is exposed to the programmer by the ExportToDataTable method of the DataSeriesCollection class. The method receives one argument: the name of the newly created data table object. The returned data table contains one column for each data series contained in the collection. The columns are named after the data series they represent.
The following example creates a data table from the Values, XValues, and Sizes data series of a Bubble Series.
VB.NET | |
---|---|
|
C# | |
---|---|
DataSeriesCollection colDataSeries = new DataSeriesCollection(); colDataSeries.Add(bubble.Values); DataTable datatable = colDataSeries.ExportToDataTable("MyTableName"); |
Related Examples
Windows Forms: Data Manipulation\Exporting\Export to DataTable