首页 > 代码库 > C# GridView使用方法

C# GridView使用方法


public
void Point_databind(PointList pl) { chart1.Series.Clear(); //清空图表 Series s1 = new Series(); //添加一条曲线 s1.Points.DataBind(pl.list, "x", "y", ""); //数据绑定 s1.ChartType = SeriesChartType.Point; //曲线类型为点 chart1.Series.Add(s1); //将曲线添加到图表 } public void Start(PointList pl, double a) { chart1.Series.Clear(); num = 0; for (int i = 0; i < pl.count; i++) { pl.list[i].Is_z = false; pl.list[i].l = 0; } mmsa(pl, a); Series s1 = new Series(); for (int i = 0; i < pl.count; i++) { DataPoint dp = new DataPoint(); //添加一个点 dp.XValue = pl.list[i].x; //给横坐标赋值 dp.SetValueY(pl.list[i].y); //纵坐标赋值 if (pl.list[i].Is_z) { dp.MarkerSize = 20; //点的大小 dp.MarkerStyle = MarkerStyle.Star5; //点类型 } dp.MarkerColor = color[(pl.list[i].l)]; s1.Points.Add(dp); } s1.ChartType = SeriesChartType.Point; chart1.Series.Add(s1); }

 

 对坐标属性的设置:

技术分享

技术分享

技术分享

 

C# GridView使用方法