社区
图表区
帖子详情
chart 的一点小问题
祥子爱游戏
2013-12-20 09:50:38
LegendCollection”中已存在名为
“lengend1”的图表元素
...全文
269
7
打赏
收藏
chart 的一点小问题
LegendCollection”中已存在名为“lengend1”的图表元素
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
祥子爱游戏
2013-12-20
打赏
举报
回复
看foreach,数据是gridview中的数据,我改变了gridview中的数据就坏了
祥子爱游戏
2013-12-20
打赏
举报
回复
public void getchart() { //Chart1.ChartAreas.Clear();//清空 //string name = null; Chart1.Width = 1000; Chart1.Height = 400; Chart1.ChartAreas[0].AxisY.Minimum = 0; Chart1.ChartAreas[0].AxisY.Maximum = 0.3; Chart1.ChartAreas[0].AxisY.Interval = 0.02; //Chart1.ChartAreas[0].AxisX.Interval = 0.3; //Chart1.RenderType = RenderType.ImageTag; Chart1.ChartAreas[0].AxisY.Title = "百分率"; Chart1.ChartAreas[0].AxisX.Title = "系部名称"; foreach (GridViewRow gvr in GridView1.Rows) { Chart1.Series["旷课"].Points.AddXY(gvr.Cells[0].Text, gvr.Cells[3].Text.ToString()); Chart1.Series["迟到"].Points.AddXY(gvr.Cells[0].Text, gvr.Cells[5].Text.ToString()); Chart1.Series["早退"].Points.AddXY(gvr.Cells[0].Text, gvr.Cells[7].Text.ToString()); Chart1.Series["请假"].Points.AddXY(gvr.Cells[0].Text, gvr.Cells[9].Text.ToString()); Chart1.Series["总缺勤"].Points.AddXY(gvr.Cells[0].Text, gvr.Cells[11].Text.ToString()); } Chart1.Series["旷课"].Color = System.Drawing.Color.Red; Chart1.Series["迟到"].Color = System.Drawing.Color.Blue; Chart1.Series["早退"].Color = System.Drawing.Color.Green; Chart1.Series["请假"].Color = System.Drawing.Color.Orange; Chart1.Series["总缺勤"].Color=System.Drawing.Color.Black; Chart1.Series["旷课"]["PointWidth"] = "0.2"; Chart1.Series["迟到"]["PointWidth"] = "0.2"; Chart1.Series["请假"]["PointWidth"] = "0.2"; Chart1.Series["早退"]["PointWidth"] = "0.2"; Chart1.Series["总缺勤"]["PointWidth"] = "0.2"; Chart1.Legends.Add("lengend1"); //Chart1.ChartAreas["Series1"].Area3DStyle.Enable3D = true;3d样式 }
祥子爱游戏
2013-12-20
打赏
举报
回复
要我贴的代码吗?我是用一个area重复添加好几个gridview的数据
熙风
2013-12-20
打赏
举报
回复
明显是重复添加了,你看下你的代码
蝶恋花雨
2013-12-20
打赏
举报
回复
改成下面的试试 Chart1.Legends.Add(new Legend("Legend1"));
http://msdn.microsoft.com/en-us/library/dd456711%28VS.100%29.aspx
蝶恋花雨
2013-12-20
打赏
举报
回复
LegendCollection 检查有没有两个lengend1 。没有的话是不是在Add之前清除下。
祥子爱游戏
2013-12-20
打赏
举报
回复
大神们。还没起床吗
ComponentOne Studio for WinForms基础课程
ComponentOne Studio for WinForms 入门教程...如耳熟能详的C1FlexGrid、C1
Char
t、C1DockingTab、C1Gauge绑定数据等控件。将这些控件直接用于您的系统中,将在大幅缩短时间的前提下,为您的用户带来完美的用户体验。
c#
char
t图形大小改变
char
tDemo.
Char
tAreas[0].AxisX.ScaleView.Position = series.Points.Count
char
tDemo.
Char
tAreas[0].AxisX.ScaleView.Size; //设置
char
t曲线实时变化 ③直线上每个点显示数值
char
t2.Series[0].Label = “#...
c#的
char
t标题_C#之
Char
t篇
叕叕叕到周五了,时间总是走的如此之快,不免伤感(- -)...1.第一个
Char
t控件1)先来熟悉一下
char
t,在前端做一个图表可能会用到
char
t.js,在C#中可以用自带的控件
char
t,感觉挺方便的。2)创建一个项目,windows窗体应...
C#之
Char
t篇
叕叕叕到周五了,时间总是走的如此之快,不免伤感(- -)。。...1)先来熟悉一下
char
t,在前端做一个图表可能会用到
char
t.js,在C#中可以用自带的控件
char
t,感觉挺方便的。 2)创建一个项目,windo
关于JFree
Char
t中Bar
Char
t柱体宽度设置的
问题
纪要
问题
JFree
Char
t中Bar
Char
t图表的柱体宽度如何设置? 说明 在JFree
Char
t的应用中,使用Bar
Char
t时出现了柱体太宽的情况,默认情况下的尺寸不是很美观,特此纪要! 纪要 处理前 下面是处理前的样图...
图表区
4,816
社区成员
14,134
社区内容
发帖
与我相关
我的任务
图表区
.NET技术 图表区
复制链接
扫一扫
分享
社区描述
.NET技术 图表区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章