第三方控件Chartlet的使用
时间:2010-08-18 来源:08信工实训
代码
ArrayList ColorGuider = new ArrayList();
ArrayList[] DataArray = { new ArrayList() };
ArrayList XLabel = new ArrayList();
DataTable Zy = 调用方法;
for (int i = 0; i < Zy.Rows.Count; i++)
{
XLabel.Add(Zy.Rows[i]["列名"].ToString());
DataArray[0].Add(Zy.Rows[i]["列名1"].ToString());
}
Rep_charts.ChartTitle.Text = "标题";
Rep_charts.XLabels.UnitText = "X轴";
Rep_charts.YLabels.UnitText = "Y轴";
Rep_charts.MaxValueY = 100;
Rep_charts.InitializeData(DataArray, XLabel, ColorGuider);
相关阅读 更多 +