public PersonQuantitativeStatisticControl() { InitializeComponent(); //初始化代码 this.de_fromdate.Text = DateTime.Now.Year.ToString() + "-01-01"; this.de_todate.Text = DateTime.Now.Year.ToString() + "-12-31"; statisticListControl.OnCellClick_RF += statisticListControl_OnCellClick; statisticListControl.OnMouseLeftButtonDownnClick += StatisticListControl_OnMouseLeftButtonDownnClick; InitSource(); StatisticModel model = new StatisticModel(); List <NameValuePair <double> > datalist = model.GetPersonRPScoreByDate(de_fromdate.Text, de_todate.Text); List <SeriesNameValue <double> > othersource = new List <SeriesNameValue <double> >(); foreach (NameValuePair <double> nvp in datalist) { SeriesNameValue <double> snv = new SeriesNameValue <double>(); snv.Name = snv.SeriesName = nvp.Name; snv.Value = nvp.Value; othersource.Add(snv); } this.statisticChartControl.StatisticItemsSource = othersource; ShowLegend = true; }