here's what i have in my datatable so far :
then after i process it using below code, i got this output :
private void graphBtn_Click_1(object sender, EventArgs e)
DataRow totalsRow = my_datatable.NewRow();
foreach (DataColumn col in my_datatable.Columns)
{
int colTotal = 0;
foreach (DataRow row in col.Table.Rows)
{
colTotal += Int32.Parse(row[col].ToString());
}
totalsRow[col.ColumnName] = colTotal;
}
my_datatable.Rows.Add(totalsRow);
but my expected output is to have something like this :
where it calculate and display the number of resource separately, then sum up all instead of it directly add up all the number of resources.