Guys, good afternoon,
I am trying to adapt the code of this tutorial: to instead of taking the data from an ADO.NET Entity Data Model pick up data from a datatable to build a graph. But when i write the code below: foreach can not operate on 'DataTable' type variables 'GetEnumerator'. How should I adapt the video code to work with datatable?string strQuery = @"SELECT Count(BussKey) AS Total, Ano FROM teste GROUP BY Ano";
DataTable data = mtdGetDadosAcDt(conexaoAccess0, strQuery);
ColumnSeries col = new ColumnSeries() { DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
Axis ax = new Axis() { Separator = new Separator() { Step = 1, IsEnabled = false } };
ax.Labels = new List<string>();
foreach (var x in data)
{
}