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
sTableName = myChartCtrl(selectedChart).Name
arrSeries.Add(line.Values, DataSeriesMask.Values)
arrSeries.Add(line.XValues, DataSeriesMask.XValues)
arrSeries.Add(line.Labels, DataSeriesMask.Labels)
NDataGridView1.DataSource = datatable
myDataGrid.Visible =
myChartCtrl(selectedChart).Refresh()
i cannot get past the arrSeries.ExportToDataTable command.
can you help, i follow your code examples but i cannot export the data.
Regards
bruce
Hello Bruce,
Most probably the data series that you export are of different length - please check whether the Values, XValues and Labels data series contain the same number of items. If not - you have to explicitly align the data series lengths. One way to do this is to call the Align method of the data series collection before calling ExportToDataTable. Please note that this will modify the original data series, so in order to avoid this you can add cloned versions of the data series in arrSeries, then call arrSeries.Align and then call arrSeries.ExportToDataTable.
Best Regards,Milen