问题如题。
如下代码:            Chart chart = new Chart();
            chart.Width = 750;
            chart.Height = 400;
            chart.RenderType = RenderType.ImageTag;
            chart.Palette = ChartColorPalette.BrightPastel;
            Title t = new Title("年度科研立项统计", Docking.Top, new System.Drawing.Font("Trebuchet MS", 14, System.Drawing.FontStyle.Bold), System.Drawing.Color.FromArgb(26, 59, 105));
            chart.Titles.Add(t);            foreach (var ID in IDs)
            {
                Department dep = db.departments.Find(ID);
                if (dep != null)
                {
                    chart.ChartAreas.Add(dep.DepartmentName);
                    chart.Series.Add(dep.DepartmentName);
                    chart.Series[dep.DepartmentName].Label = "#VAL";
                    chart.Series[dep.DepartmentName].LegendText = dep.DepartmentName;
                    chart.Series[dep.DepartmentName].ChartType = SeriesChartType.Line;                    var query = ...
                    foreach (var item in query)
                    { 
                        chart.Series[dep.DepartmentName].Points.AddXY(item.A,item.B);
                    }
                }
            }            chart.ChartAreas[0].AxisX.Interval = 1;   //设置X轴坐标的间隔为1
            chart.ChartAreas[0].AxisX.IntervalOffset = 1;  //设置X轴坐标偏移为1
            chart.ChartAreas[0].AxisX.LabelStyle.IsStaggered = false;   //设置是否交错显示,比如数据多的时间分成两行来显示  
            //chart.BorderSkin.SkinStyle = BorderSkinStyle.Emboss;
            chart.BorderColor = System.Drawing.Color.FromArgb(26, 59, 105);
            chart.BorderlineDashStyle = ChartDashStyle.Solid;
            chart.BorderWidth = 2;
            chart.Legends.Add("Legend1");再描述一下:
对于折线图(整体大小750*400是可以固定的),当有1条折线时,折线图大小为1;2条时,1/2;4条时,1/4;而我的数据能产生一二十条折线,结果,变鸡巴了。
求高人!