在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
并且在工具箱中添加了 画曲线图 aspx页面代码如下: <%@ Page language="c#" Codebehind="CookePic.aspx.cs" AutoEventWireup="false" Inherits="WS.Webs.CookePic" %> <%@ Register TagPrefix="cc1" Namespace="ZedGraph.Web" Assembly="ZedGraph.Web" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>CookePic</title> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> </HEAD> <body MS_POSITIONING="GridLayout"> <form > <cc1:ZedGraphWeb ></cc1:ZedGraphWeb> </form> </body> </HTML> aspx.cs 页面关键代码 //引用 using ZedGraph; using ZedGraph.Web; private void InitializeComponent() private void OnRenderGraph(ZedGraph.Web.ZedGraphWeb webObject, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane) DataColumn col0=new DataColumn("股票名称"); dt.Columns.Add(col0); DataRow row1=dt.NewRow(); DataRow row2=dt.NewRow();
//创建两条曲线 list1.Add(x, y1); string[] labels = new string[dt.Columns.Count-1]; myPane.XAxis.Scale.TextLabels = labels; //这里设置的是TextLabels属性,所以下面x轴的类型必须也设置为Text //设置x轴的样式 myPane.XAxis.CrossAuto = true; masterPane.AxisChange(g); |
请发表评论