2014-01-21 53 views
0
for (int t = 0; t < ARF.Rows.Count; t += 1) 
{ 
    Chart1.Series[t].ChartType = SeriesChartType.Column; 
    Chart1.Series[t].BorderWidth = 2; 

    Chart1.Series[t].ToolTip = "(#VALX,#VALY)"; 
    Chart1.ChartAreas["ChartArea1" + t.ToString()].AxisX.Title = "Learning Domains"; 
    Chart1.ChartAreas["ChartArea1" + t.ToString()].AxisY.Title = "Covered"; 


    Chart1.Legends.Add("Legend1" + t.ToString()); 
    Chart1.Legends["Legend1" + t.ToString()].Enabled = false; 
    // Chart1.Legends["Legend1" + t.ToString()].Docking = Docking.Bottom; 
    Chart1.Legends["Legend1" + t.ToString()].Alignment = System.Drawing.StringAlignment.Center; 
    Chart1.Legends["Legend1" + t.ToString()].DockedToChartArea = "ChartArea1" + t.ToString(); 
    // Chart1.Legends["Legend1" + t.ToString()].IsDockedInsideChartArea = false; 
    Random random = new Random(); 
    foreach (var item in Graph.Series[0].Points) 
    { 
     System.Drawing.Color c = System.Drawing.Color.FromArgb(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255)); 
     item.Color = c; 

    } 

    Chart1.Series[t]["PointWidth"] = "0.2"; 
    Chart1.Series[t]["BarLabelStyle"] = "Center"; 
    Chart1.Series[t]["PixelPointDepth"] = "99"; 
    Chart1.Series[t]["DrawingStyle"] = "Cylinder"; 

} 

for (int i = 0; i < 5; i++) 
{ 
    GridView gv = new GridView(); 
    gv.DataSource = ds; 
    ph.Controls.Add(gv); 
} 

这是创建5个图表的代码,我需要5个图表和5个表格视图数据在一起。你能帮我做...我已经尝试过,但图表即将到来,网格不可见。使用表格创建图表

+0

给我们一个战斗的机会是什么Chart1? – Liath

+0

chart1是图表.. – user3218871

+0

我的意思是.NET类型 – Liath

回答

0

如果您使用的Web应用程序,您可以使用谷歌图表: 您可以参考以下链接:

https://developers.google.com/chart/interactive/docs/gallery/controls