你的两个series绑定了两个数据,导致第二个series没有正常显示出来,可以用如下的方式绑定一个数据源
- report.DataSources.Add(new DataSource { Name = "Ds1", Recordset = new List<FitModel> { new FitModel { x = 1, y = 10, y1=10 }, new FitModel { x = 2, y = 11, y1 = 22 }, new FitModel { x = 3, y = 12, y1 = 24 }, new FitModel { x = 4, y = 13, y1 = 20 }, new FitModel { x = 5, y = 14, y1 = 20 }, new FitModel { x = 6, y = 15, y1 = 20 }, new FitModel { x = 7, y = 16, y1 = 20 }, new FitModel { x = 8, y = 17, y1 = 20 }, new FitModel { x = 9, y = 18, y1 = 20 }, new FitModel { x = 10, y = 19, y1 = 20 }, new FitModel { x = 11, y = 20, y1 = 20 }, new FitModel { x = 12, y = 21, y1 = 20 }, } });
- public class FitModel
- {
- public int x { get; set; }
- public int y { get; set; }
- public int y1 { get; set; }
- }
复制代码
|