hello
i am trying to export a simple Line chart data (XY series) to a data table. i think i follow your examples but i keep getting the same error when i run, that the "The data series must have the same size."
Private
Sub nExportData_Click(ByVal sender As System.Object, ByVal e As Nevron.UI.WinForm.Controls.CommandEventArgs) Handles nExportData.ClickDim chart As NChart = myChartCtrl(selectedChart).Charts(0)Dim arrSeries As NDataSeriesCollection = New NDataSeriesCollection()Dim sTableName As String = ""Dim dataView1 = New System.Data.DataView()Dim myDataGrid = New System.Windows.Forms.DataGrid()Dim line As NLineSeries = CType(chart.Series(0), NLineSeries)'Dim myGrid As NDataSeriesGridsTableName = myChartCtrl(selectedChart).Name
arrSeries.Add(line.Values, DataSeriesMask.Values)
arrSeries.Add(line.XValues, DataSeriesMask.XValues)
arrSeries.Add(line.Labels, DataSeriesMask.Labels)
' customize the toolbar of the grid'NChartGridControl1.ChartGridButtonsMask = ChartGridButtonsMask.UpdateGridFromSeries Or ChartGridButtonsMask.UpdateSeriesFromGrid Or ChartGridButtonsMask.BindToChart' create your datagrid derivate'myGrid = New NDataSeriesGrid()'myGrid.DataSource = arrSeries.ExportToDataTable("Line Chart")' replace the data grid used by the NChartGridControl'NChartGridControl1.DataSeriesGrid = myGrid' bind to the chart control'NChartGridControl1.ChartControl = myChartCtrl(selectedChart)Dim datatable As DataTable = arrSeries.ExportToDataTable("kl") --- fails here no matter what i put as the string.'dataView1 = New System.Data.DataView()'dataView1.Table = arrSeries.ExportToDataTable("kl")NDataGridView1.DataSource = datatable
Me.DataGrid.DataSource = datatableMe.Controls.Add(myDataGrid)myDataGrid.Visible =
TruemyChartCtrl(selectedChart).Refresh()
End Sub
i cannot get past the arrSeries.ExportToDataTable command.
can you help, i follow your code examples but i cannot export the data.
Regards
bruce