PHP速学视频免费教程(入门到精通)
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
1.下载zedgraph控件:http://download.csdn.net/detail/allisnew/322251
2.添加引用 zedGraph.dll
3.在工具箱的最后面添加常规控件--浏览--选择zedgraph.dll
4.编写如下初始化代码(也可以直接拖一个控件):
private ZedGraphControl zedGraphControl1 = new ZedGraphControl(); this.zedGraphControl1.Location = new System.Drawing.Point(36, 48); this.zedGraphControl1.Name = "zedGraphControl1"; this.zedGraphControl1.ScrollGrace = 0; this.zedGraphControl1.ScrollMaxX = 0; this.zedGraphControl1.ScrollMaxY = 0; this.zedGraphControl1.ScrollMaxY2 = 0; this.zedGraphControl1.ScrollMinX = 0; this.zedGraphControl1.ScrollMinY = 0; this.zedGraphControl1.ScrollMinY2 = 0; this.zedGraphControl1.Size = new System.Drawing.Size(427, 247); this.zedGraphControl1.TabIndex = 0; this.Controls.Add(zedGraphControl1);
5.编写绘图代码:
private void ShowChart() { zedGraphControl1.GraphPane.CurveList.Clear(); zedGraphControl1.GraphPane.GraphObjList.Clear(); // clearing not teste GraphPane myPane = zedGraphControl1.GraphPane; myPane.Title.Text = "消费者学历统计"; //设计图表的标题 myPane.XAxis.Title.Text = "学历类型"; //X轴标题 myPane.YAxis.Title.Text = "人数"; //Y轴标题 // myPane.XAxis.Type = ZedGraph.AxisType.Date; // Date wont work in our case PointPairList PPLa = new PointPairList(); PointPairList PPLb = new PointPairList(); PointPairList PPLc = new PointPairList(); PointPairList PPLd = new PointPairList(); for (int i = 1; i <p>如需要横坐标显示文字:</p><pre class="brush:c#;toolbar:false;"> private void ShowChart() { zedGraphControl1.GraphPane.CurveList.Clear(); zedGraphControl1.GraphPane.GraphObjList.Clear(); // clearing not teste GraphPane myPane = zedGraphControl1.GraphPane; // 画图面版标题 myPane.Title.Text = "收入统计"; // 画图面版X标题 myPane.XAxis.Title.Text = "区域"; myPane.XAxis.Scale.Min = 0; //初始化数据 PointPairList list = new PointPairList(); PointPairList list2 = new PointPairList(); PointPairList list3 = new PointPairList(); for (int i = 0; i <p> 以上就是C# 使用zedgraph绘制 柱状图的详解的内容,更多相关内容请关注PHP中文网(www.php.cn)!<br></p>
已抢7199个
抢已抢94710个
抢已抢14801个
抢已抢52062个
抢已抢194616个
抢已抢87259个
抢