Step1: Making Dictionary
Dictionary<string,int> dic=new Dictionary<string,int>();
dic.Add("Done",10);
dic.Add("Pending",2);
dic.Add("InProgress",4);
Step2: Binding
Chart1.DataSource = dic;
foreach (KeyValuePair<string, int> progress in data)
{
Chart1.Series[0].Points.AddXY(progress.Key, progress.Value);
}
Chart1.DataBind();
No comments:
Post a Comment