Graphing in C#

Jan 11 2016 9:16 PM
Hello. I got this data in my database
i am using this code to get those data then put them on an array.
 
string item_db= reader.GetString(15);
string amount_db= reader.GetString(17);
string[] str_item= item_db.Split('~');
string[] str_amount = amount_db.Split('~');
 
i will be using them in a graphs. but what i get is this.
 
 
i want to merge those items that are the same as well as merge their value..  so sir how can i do that?.
 
 here's my code for the graph . 
 
 string item_db= reader.GetString(15);
string amount_db= reader.GetString(17);
string[] str_item= item_db.Split('~');
string[] str_amount = amount_db.Split('~');
for (int i = 0; i < str1.Count() - 1; i++)
{
double brand_amount = 0.00;
try
{
if (str1[i] != "")
{
brand_amount = brand_amount + double.Parse(str_amount [i]);
this.chart_p_performance.Series["Series1"].Points.AddXY(str_item[i], brand_amount);
}
}
 
and by the way im using mysql as my database. Thank You.. 
 

Answers (1)