ZedGraphControl控件 用法 解决者高分100分 各位来自五湖四海的高手们 能帮在下一个小小的忙吗 能使用ZedGraphControl 控件, 并用图像类型是矩形图和饼形图 连接DATAVIEW中的数据 绑定到ZedGraphControl控件中 并显示出来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://wrs765.blog.sohu.com/entry/3821981/ 你是B/S 还是C/SC/S 可以照抄DEMOB/S 比较麻烦一点要在页面上增加一个IMAGE 不要指向图片,指向一个ASPX这个ASPX比较特殊页面代码<%@ Page Language="c#" Inherits="ZG1.graph" CodeFile="mygraph.aspx.cs" %><%@ Register TagPrefix="zgw" Namespace="ZedGraph.Web" Assembly="ZedGraph.Web" %><ZGW:ZEDGRAPHWEB id="ZedGraphWeb1" runat="server" width="398" Height="350" RenderMode="RawImage" />后台代码,实现OnRenderGrap方法 private void OnRenderGraph(ZedGraphWeb zed,System.Drawing.Graphics g, ZedGraph.MasterPane masterPane){//参照 C/S的DEMO} 是winform中的 一个ZedGraphControl控件,使用C#语言,Demo没有用的 ,用代码画个矩形图和饼形图,并且连接数据库,用DATAVIEW 连接ZedGraphControl,显示数据库中员工的string[] labels = { "很满意", "满意", "一般", "不满意", "很差" };数据, ZedGraph 我也在用这个控件,加我QQ有时间交流一下!1003136069 ,你写上CSDN就加你了 wuyq11(人生如梦) 请你回答一下 this.gdvEduList.DataSource = FeedBackInfoDataCount.EduDataCount();中FeedBackInfoDataCount,gdvEduList从哪里来的 能解释一下吗 谢谢 请尽快回复 你是不是想用ZEDGRAPH 绑定数据源来完成需求,这个还真没做过,DEMO里也是要手工一个个附值的。 不是 在WINFORM里面 没有DEMO的 只有控件 DATAVIEW中显示的数据 能及时的更新到ZEDGRAPH 并显示出来 那位高手能支一招啊 GraphPane mypane = zg1.GraphPane; mypane.CurveList.Clear(); mypane.GraphObjList.Clear(); mypane.Title.Text = "员工评价分析图表"; mypane.Title.FontSpec.Size = 20f; mypane.YAxis.Scale.Max = 10; PointPairList list = new PointPairList(); string[] labels = { "很满意", "满意", "一般", "不满意", "很差" }; double[] y = { 12, 0, 0, 0, 0 }; double[] y2 = { 0, 40, 0, 0, 0 }; double[] y3 = { 0, 0, 60, 0, 0 }; double[] y4 = { 0, 0, 0, 30, 0 }; double[] y5 = { 0, 0, 0, 0, 35 }; BarItem myBar = mypane.AddBar("很满意", null, y, Color.Red); myBar.Bar.Fill = new Fill(Color.Red, Color.White, Color.Red); myBar = mypane.AddBar("满意", null, y2, Color.Blue); myBar.Bar.Fill = new Fill(Color.Blue, Color.White, Color.Blue); myBar = mypane.AddBar("一般", null, y3, Color.Green); myBar.Bar.Fill = new Fill(Color.Green, Color.White, Color.Green); myBar = mypane.AddBar("不满意", null, y4, Color.DarkOrange); myBar.Bar.Fill = new Fill(Color.DarkOrange, Color.White, Color.DarkOrange); myBar = mypane.AddBar("很差", null, y5, Color.WhiteSmoke); myBar.Bar.Fill = new Fill(Color.WhiteSmoke, Color.White, Color.WhiteSmoke); mypane.XAxis.MajorTic.IsBetweenLabels = true; mypane.XAxis.Scale.TextLabels = labels; mypane.XAxis.Type = AxisType.Text; mypane.Chart.Fill = new Fill(Color.White, Color.FromArgb(255, 255, 166), 1200F); mypane.Fill = new Fill(Color.FromArgb(250, 250, 255)); mypane.Legend.Position = LegendPos.BottomCenter; mypane.Legend.Location = new Location(0.95f, 0.15f, CoordType.AxisXY2Scale, AlignH.Center, AlignV.Bottom); zg1.AxisChange();这个是死代码 zg1.Refresh();//必须加入这一句才能显示 一些基础问题 如何设置某段IP才可以运行登录 关于combobox联动问题 求一VS2005的基于ACCESS的数据操作类! 海辉高科大家听过吗? 怎么样? 2个Ilist怎么去除里面的重复数据,是否重复按他们中间都有的列A来判断 UserControl的属性问题~~~~~~~~~ 谁有很好的方法实现数据库记录翻转,。net的不足? 新人送小分,高手别嫌少。怎么把dataset 导入xml(不是一般的欧~) .NET开发的客户管理系统(B/S),欢迎下载试用 窗体 通信问题 C#记录软件的操作日志
C/S 可以照抄DEMO
B/S 比较麻烦一点
要在页面上增加一个IMAGE 不要指向图片,指向一个ASPX
这个ASPX比较特殊
页面代码<%@ Page Language="c#" Inherits="ZG1.graph" CodeFile="mygraph.aspx.cs" %>
<%@ Register TagPrefix="zgw" Namespace="ZedGraph.Web" Assembly="ZedGraph.Web" %>
<ZGW:ZEDGRAPHWEB id="ZedGraphWeb1" runat="server" width="398" Height="350" RenderMode="RawImage" />后台代码,实现OnRenderGrap方法 private void OnRenderGraph(ZedGraphWeb zed,System.Drawing.Graphics g, ZedGraph.MasterPane masterPane)
{
//参照 C/S的DEMO
}
mypane.CurveList.Clear();
mypane.GraphObjList.Clear(); mypane.Title.Text = "员工评价分析图表";
mypane.Title.FontSpec.Size = 20f;
mypane.YAxis.Scale.Max = 10; PointPairList list = new PointPairList();
string[] labels = { "很满意", "满意", "一般", "不满意", "很差" };
double[] y = { 12, 0, 0, 0, 0 };
double[] y2 = { 0, 40, 0, 0, 0 };
double[] y3 = { 0, 0, 60, 0, 0 };
double[] y4 = { 0, 0, 0, 30, 0 };
double[] y5 = { 0, 0, 0, 0, 35 };
BarItem myBar = mypane.AddBar("很满意", null, y, Color.Red);
myBar.Bar.Fill = new Fill(Color.Red, Color.White, Color.Red);
myBar = mypane.AddBar("满意", null, y2, Color.Blue);
myBar.Bar.Fill = new Fill(Color.Blue, Color.White, Color.Blue);
myBar = mypane.AddBar("一般", null, y3, Color.Green);
myBar.Bar.Fill = new Fill(Color.Green, Color.White,
Color.Green); myBar = mypane.AddBar("不满意", null, y4, Color.DarkOrange);
myBar.Bar.Fill = new Fill(Color.DarkOrange, Color.White, Color.DarkOrange);
myBar = mypane.AddBar("很差", null, y5, Color.WhiteSmoke);
myBar.Bar.Fill = new Fill(Color.WhiteSmoke, Color.White, Color.WhiteSmoke);
mypane.XAxis.MajorTic.IsBetweenLabels = true; mypane.XAxis.Scale.TextLabels = labels; mypane.XAxis.Type = AxisType.Text; mypane.Chart.Fill = new Fill(Color.White, Color.FromArgb(255, 255, 166), 1200F); mypane.Fill = new Fill(Color.FromArgb(250, 250, 255));
mypane.Legend.Position = LegendPos.BottomCenter;
mypane.Legend.Location = new Location(0.95f, 0.15f, CoordType.AxisXY2Scale, AlignH.Center, AlignV.Bottom);
zg1.AxisChange();这个是死代码