private void showColumnChart() { List <KeyValuePair <string, double> > valueList = new List <KeyValuePair <string, double> >(); double ov_value = Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-11), new DateTime(1800, 1, 1)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-11).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-10), DateTime.Now.AddMonths(-11)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-10).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-9), DateTime.Now.AddMonths(-10)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-9).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-8), DateTime.Now.AddMonths(-9)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-8).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-7), DateTime.Now.AddMonths(-8)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-7).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-6), DateTime.Now.AddMonths(-7)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-6).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-5), DateTime.Now.AddMonths(-6)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-5).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-4), DateTime.Now.AddMonths(-5)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-4).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-3), DateTime.Now.AddMonths(-4)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-3).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-2), DateTime.Now.AddMonths(-3)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-2).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now.AddMonths(-1), DateTime.Now.AddMonths(-2)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.AddMonths(-1).ToString("MM/yy"), ov_value)); ov_value += Transacao.get_Sum_Transactions(p.ID, DateTime.Now, DateTime.Now.AddMonths(-1)); valueList.Add(new KeyValuePair <string, double>(DateTime.Now.ToString("MM/yy"), ov_value)); //Setting data for line chart lineChart.DataContext = valueList; }