求助:关于axMSChart实现饼状图的问题!!!
joe83 2007-04-22 01:34:21 Object[] myay=new Object[4];
for(int i=0;i<=3;i++)
{
String[] names = new string[4]{"类型1","类型2","类型3","类型4"};
Int32 count=0;
DataBase dbLink = new DataBase();
string strSQL = "SELECT COUNT(*) FROM 登记表 WHERE 类型='"+names[i].ToString()+"'";
try
{
count = dbLink.getCount( strSQL );
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
myay[i]=(Object)count.ToString();
}
axMSChart1.ChartData = myay;
axMSChart1.Legend.Location.LocationType = MSChart20Lib.VtChLocationType.VtChLocationTypeRight;
axMSChart1.Legend.Location.Visible = true;
}
这样的话可以显示一个饼状图,但旁边的标注为:*:c1
*: c2
*: c3
*: c4
请问怎样把c1,c2,c3,c4替换为“类型1,类型2,类型3,类型4”。
刚刚接触C#,最好解答的详细些。
还有就是怎样把比例加进去。
多谢啦!!!!!