在asp.net里一般用什么做分析的图(如:曲线图,饼图,柱状图)
在asp.net里一般用什么做分析的图(如:曲线图,饼图,柱状图),开发比较块,样式漂亮,对于曲线图最后能实现能显示几条曲线:
如:在一个坐标中显示:采购数量,采购金额,等曲线图
项目赶的急马上要出东西来,没有时间研究,打家最后能贴出代码,或发代码到ly_crm@163.com
最后不要给我发那些需要花钱买的第三方组件的例子,因为我们这个项目没有钱买啊.
最想了解的是曲线图,分不够我可以补上.
问题点数:100、回复次数:57Top
1 楼fphuang(人在哈尔滨·四月)回复于 2006-03-08 08:38:51 得分 5
http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95
在ASP.NET中使用Office Web Components (OWC)创建统计图Top
2 楼bleempan(跟我青梅竹马的原来是我的电脑...)回复于 2006-03-08 08:40:06 得分 5
水晶报表Top
3 楼lzgctgc(理引商务)回复于 2006-03-08 08:41:24 得分 0
http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95
在ASP.NET中使用Office Web Components (OWC)创建统计图
柱状图我已经搞定了,现在想要曲线图,和饼图的代码啊.
对于曲线图最后能实现能显示几条曲线:
如:在一个坐标中显示:采购数量,采购金额,等曲线图
Top
4 楼lzgctgc(理引商务)回复于 2006-03-08 08:42:21 得分 0
希望大家贴上代码,因为赶的急,没有时间研究啊
Top
5 楼gngnandgngn(仗义执言 )回复于 2006-03-08 08:42:34 得分 5
用一些报表组件会比较好Top
6 楼haolaiwu(宁愿相信世界上有鬼,也不相信女人那张嘴)回复于 2006-03-08 08:46:45 得分 5
可以用水晶报表啊Top
7 楼xjjdanran(何流)回复于 2006-03-08 08:50:15 得分 5
OWC可以做到这些统计Top
8 楼shoutor(www.mouxiao.com)回复于 2006-03-08 08:50:24 得分 5
Office中的OWC11Top
9 楼lzgctgc(理引商务)回复于 2006-03-08 08:51:56 得分 0
Office中的OWC11
-----------------------
我也打算用OWC11但大家发写例子啊Top
10 楼cow8063(天涯远不远?不远!人在天涯,天涯怎会远)回复于 2006-03-08 09:03:02 得分 5
学习中Top
11 楼lzgctgc(理引商务)回复于 2006-03-08 09:09:52 得分 0
怎么没有人能贴点代码来,分不够我在加吗
Top
12 楼daiming(小蔚)回复于 2006-03-08 09:14:21 得分 0
http://www.wave12.com代码太长Top
13 楼chenhaoying(风雨无阻)回复于 2006-03-08 09:41:41 得分 5
reporting serviesTop
14 楼jacky125()回复于 2006-03-08 09:46:03 得分 5
http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95
这里有原代码Top
15 楼silk_C(silk)回复于 2006-03-08 09:48:27 得分 5
用水晶报表啊,挺方便的!!Top
16 楼jxdyzwh(http://www.szsoftware.com.cn)回复于 2006-03-08 09:50:54 得分 5
水晶报表Top
17 楼daishengs(横舟摆渡)回复于 2006-03-08 10:04:37 得分 5
OWC应该也很简单的,只要传一组数据就行了。Top
18 楼ddangerous169(零点烛光)回复于 2006-03-08 10:21:20 得分 0
自己写比较方便,也快捷;以后维护也容易,一般我开发这样的模块平均0.5天。
需要的话,我给你发一个。Top
19 楼lzgctgc(理引商务)回复于 2006-03-08 10:26:04 得分 0
自己写比较方便,也快捷;以后维护也容易,一般我开发这样的模块平均0.5天。
需要的话,我给你发一个。
好啊,你给我发个例子看看,ly_crm@163.comTop
20 楼qiujsh(www.chinascsoft.com)回复于 2006-03-08 10:27:27 得分 5
以前自己用delphi里写了一个组件,然后放到.net里,感觉挺好用Top
21 楼wdzr_826(玉面斗鸡眼)回复于 2006-03-08 10:30:08 得分 5
office里有自带啊Top
22 楼lzgctgc(理引商务)回复于 2006-03-08 10:48:16 得分 0
到现在没有一个贴出我需要的代码Top
23 楼kingdhy(飞鹰)回复于 2006-03-08 10:57:47 得分 5
markTop
24 楼changhaozheng(clzheng)回复于 2006-03-08 11:00:51 得分 10
我用DundasWebChart
Dim material_select = DropDownList1.SelectedValue
Dim series As New Series("line")
'series.ChartType = "spline"
series.BorderWidth = 4
Dim this_month, this_day, i, j
i = Split(System.DateTime.Today, "-")
Dim the_month = i(0) & "年" & i(1) & "月"
If Len(i(1)) = 1 Then
i(1) = "0" & i(1)
End If
If Len(i(2)) = 1 Then
i(2) = "0" & i(2)
End If
'this_day = i(0) & i(1) & i(2)
this_day = System.DateTime.Today.ToString("yyyyMMdd")
this_month = i(0) & i(1)
Dim month_first = i(0) & i(1) & "01"
sql = "select * from VIEW_PSD_JOIN_COUNT where samp_id >='" & month_first & "' and samp_id <='" & this_day & "' and stat_name = '" & material_select & "' order by samp_id"
da = New OracleDataAdapter(sql, cn)
Dim ds_material As DataSet = New DataSet
Try
da.Fill(ds_material, "material")
Catch ex As Exception
Response.Write("<script>alert('" + ex.message + "')</script>")
Return
End Try
cn.Close()
da.Dispose()
Dim tabel1 As DataTable = ds_material.Tables("material")
Dim x As Integer = ds_material.Tables("material").Rows.Count
Dim c As New DataColumn("prodece_plan")
c.DataType = System.Type.GetType("System.Decimal")
c.Caption = "prodece_plan"
tabel1.Columns.Add(c)
Dim d As New DataColumn("sale_plan")
d.DataType = System.Type.GetType("System.Decimal")
d.Caption = "sale_plan"
tabel1.Columns.Add(d)
Dim produce_left As New DataColumn("produce_left")
produce_left.DataType = System.Type.GetType("System.Decimal")
produce_left.Caption = "sale_plan"
tabel1.Columns.Add(produce_left)
Dim y
For y = 0 To x - 1
Dim day_count = CInt(Right(tabel1.Rows(y)("samp_id"), 2))
tabel1.Rows(y).Item("prodece_plan") = Int(tabel1.Rows(y)("plan_produce") * day_count / month_day())
tabel1.Rows(y).Item("sale_plan") = Int(tabel1.Rows(y)("prodece_plan") * day_count / month_day())
'Dim the_samp_id = CDate(tabel1.Rows(y)("samp_id"))
Dim the_year = Left(tabel1.Rows(y)("samp_id"), 4)
Dim cur_month = CInt(Mid(tabel1.Rows(y)("samp_id"), 5, 2))
Dim samp_day = CDate(the_year & "-" & cur_month & "-" & day_count)
'Dim the_samp_id = CDate(samp_day)
Dim next_month_first
If cur_month = 12 Then
next_month_first = CDate((the_year + 1) & "-1-1")
Else
next_month_first = CDate(the_year & "-" & (cur_month + 1) & "-1")
End If
Dim month_lef = Math.Round(DateDiff(DateInterval.Day, samp_day, next_month_first) - 5 / 3, 3)
If tabel1.Rows(y)("plan_produce") > tabel1.Rows(y)("mount_produce") Then
tabel1.Rows(y)("produce_left") = Math.Round((tabel1.Rows(y)("plan_produce") - tabel1.Rows(y)("mount_produce")) / month_lef, 0)
End If
Next
Dim dv As DataView = New DataView
'Chart1.Titles.Insert(0, "公司" & the_month & material_select & "生产情况走势")
dv = tabel1.DefaultView
Dim sername As String = the_month & material_select & "的" & Dropdownlist2.SelectedValue
If Chart1.Series.GetIndex(sername) > 0 Then
Label3.ForeColor = Color.Red
Label3.Text = "指定的项目已经存在"
Return
End If
If Chart1.Series.Count > 3 Then
Label3.ForeColor = Color.Red
Label3.Text = "项目太多,请清除不需要的项目"
Return
End If
Try
Dim ser As Series = Chart1.Series.Add(sername)
ser.Color = sercolors(Chart1.Series.Count - 1)
ser.LegendText = the_month & material_select & "的" & Dropdownlist2.SelectedValue
ser.ChartArea = Chart1.ChartAreas(0).Name
ser.ChartType = "spline"
ser.XValueType = ChartValueTypes.Date
ser.ShowLabelAsValue = cbDigit.Checked
'ser.Name = sername.ToString
If Dropdownlist2.SelectedValue = "当日产量" Then
ser.Points.DataBindXY(dv, "samp_id", dv, "today_produce")
ser.FontColor = Color.Red
ElseIf Dropdownlist2.SelectedValue = "剩余日均" Then
ser.Points.DataBindXY(dv, "samp_id", dv, "produce_left")
ser.FontColor = Color.Blue
ElseIf Dropdownlist2.SelectedValue = "当日月累" Then
ser.Points.DataBindXY(dv, "samp_id", dv, "mount_produce")
'Chart1.Series.YAxisType = AxisType.Secondary
ser.YAxisType = AxisType.Secondary
ser.FontColor = Color.Black
ElseIf Dropdownlist2.SelectedValue = "计划进度" Then
ser.Points.DataBindXY(dv, "samp_id", dv, "prodece_plan")
ser.FontColor = Color.Chocolate
ser.YAxisType = AxisType.Secondary
End If
ser.ValueMemberX = "samp_id"
'Label3.ForeColor = Color.Blue
Label3.Text = ""
Catch ex As Exception
Label3.ForeColor = Color.Red
Label3.Text = ex.Message
End TryTop
25 楼lzgctgc(理引商务)回复于 2006-03-08 11:51:01 得分 0
自己再顶Top
26 楼Dluxd()回复于 2006-03-09 09:14:54 得分 0
就是没人说GDI+Top
27 楼wjmwjmwjm(wjmwjmwjm)回复于 2006-03-09 09:32:09 得分 0
nplotTop
28 楼nicholascheung(我要的幸福)回复于 2006-03-09 09:32:42 得分 0
InfragisticsTop
29 楼kittow(天笑)回复于 2006-03-09 09:35:48 得分 0
自己用GDI+做曲线图比较麻烦
微软本身就给我们提供了很好用的组件OWC(噢~~WC!;)
http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95
在ASP.NET中使用Office Web Components (OWC)创建统计图Top
30 楼fangbuge(窗外的雨)回复于 2006-03-09 09:39:05 得分 0
owcTop
31 楼kv4000(ABCD(A Brave Csharp Developer))回复于 2006-03-09 09:49:14 得分 0
http://www.cnblogs.com/jmtek/archive/2006/02/23/336073.html
看了上面哪个统计图,你就会后悔用了其他的统计图Top
32 楼zty0527(听说女人如衣服,兄弟如手足。回想起来,我竟然七手八脚的裸奔了25年!)回复于 2006-03-09 09:56:45 得分 0
有一套控件叫Infragistics NetAdvantage 2005 Vol 1 ASP NET Final,这个比较好用,可以设计自己的样式,我这里有Top
33 楼king2003(鱼)回复于 2006-03-09 10:01:59 得分 0
http://www.txsec.com/system/gbg.asp?display=1
Top
34 楼flyinglx16(流向)回复于 2006-03-09 10:04:34 得分 0
给我发一份,1212ljy@sina.com
谢谢!Top
35 楼king2003(鱼)回复于 2006-03-09 10:10:33 得分 0
说谁呢Top
36 楼RedRain0220(红雨)回复于 2006-03-09 10:29:30 得分 0
DundasWebChart,这个比较简单Top
37 楼menuvb(戏子,白日做梦)回复于 2006-03-09 11:19:27 得分 0
http://www.codeproject.com/aspnet/owc11article.aspTop
38 楼bbbbcccc()回复于 2006-03-09 11:29:57 得分 0
http://valenhua.go3.icpcn.com/Top
39 楼lzgctgc(理引商务)回复于 2006-03-09 11:52:51 得分 0
#region 创建线状图片
public void BuildLineWebChart(string pTitle,string pXValue,string pYValue,int pWidth,int pHeight,string[] arrValues,string[] arrValueNames,string pSavePath)
{
//创建ChartSpace对象来放置图表
OWC.ChartSpace objCSpace = new OWC.ChartSpaceClass ();
//在ChartSpace对象中添加图表,Add方法返回chart对象
OWC.WCChart objChart = objCSpace.Charts.Add (0);
//指定图表的类型。类型由OWC.ChartChartTypeEnum枚举值得到
objChart.Type = OWC.ChartChartTypeEnum.chChartTypeLine;
//指定图表是否需要图例
objChart.HasLegend = true;
//给定标题
objChart.HasTitle = true;
objChart.Title.Caption= pTitle;
//objChart.Title.Font.Bold=;
objChart.Title.Font.Color = "blue";
objChart.Title.Font.Italic = false;
objChart.Title.Font.Name = "隶书";
objChart.Title.Font.Size = 18;
objChart.Title.Font.Underline = c.owcUnderlineStyleSingle;
//给定x,y轴的图示说明
objChart.Axes[0].HasTitle = true;
objChart.Axes[0].Title.Caption = pYValue;
objChart.Axes[1].HasTitle = true;
objChart.Axes[1].Title.Caption = pXValue;
string sCategory="";
string sValue="";
string sSeries="";
for (int i = 0; i < arrValueNames.Length; i++)
{
sSeries += arrValues[i].ToString();
sCategory += arrValueNames[i].ToString()+'\t';
sValue += arrValues[i].ToString()+'\t';
}
//添加一个series
objChart.SeriesCollection.Add(0);
//给定series的名字
objChart.SeriesCollection[0].SetData (OWC.ChartDimensionsEnum.chDimSeriesNames,
+ (int)OWC.ChartSpecialDataSourcesEnum.chDataLiteral, sSeries);
//给定分类
objChart.SeriesCollection[0].SetData (OWC.ChartDimensionsEnum.chDimCategories,
+ (int)OWC.ChartSpecialDataSourcesEnum.chDataLiteral, sCategory);
//给定值
objChart.SeriesCollection[0].SetData (OWC.ChartDimensionsEnum.chDimValues,
(int)OWC.ChartSpecialDataSourcesEnum.chDataLiteral, sValue);
//输出成GIF文件.
objCSpace.ExportPicture(pSavePath, "GIF", pWidth, pHeight);
}
#endregion
我用OWC写曲线图是 objChart.Title.Font.Color = "blue";
objChart.Title.Font.Italic = false;
objChart.Title.Font.Name = "隶书";
objChart.Title.Font.Size = 18;
objChart.Title.Font.Underline = c.owcUnderlineStyleSingle;
这样设置title字体怎么不行啊,应该怎么设置,
还有我想在一个座标系中显示4条曲线图怎么实现(采购数量,采购金额,等)Top
40 楼lzgctgc(理引商务)回复于 2006-03-09 12:46:18 得分 0
自己顶Top
41 楼guodashao(郭大少)回复于 2006-03-09 13:11:20 得分 0
看看Top
42 楼pantian(香草园主)回复于 2006-03-09 13:22:31 得分 0
路过Top
43 楼gouzhi(天涯人)回复于 2006-03-09 13:34:49 得分 0
网上有一些控件,但大都收费的!
可以搜一下看看的!Top
44 楼lengbb(笨笨)回复于 2006-03-09 13:47:52 得分 0
直接画出来,.net提供的画图功能很强大的Top
45 楼hanbb1982(粤饶字号@0768)回复于 2006-03-09 13:48:02 得分 0
vml,用脚本写.Top
46 楼lzgctgc(理引商务)回复于 2006-03-09 15:31:00 得分 0
我想在一个座标系中显示4条曲线图怎么实现(采购数量,采购金额,等)
怎么搞定啊
Top
47 楼nameone(过客)回复于 2006-03-09 15:36:25 得分 0
UPTop
48 楼50277(柳影随风)回复于 2006-03-09 16:08:59 得分 5
曲线图我是用GDI来做,画N条曲线都没问题,不过就是处理起有点麻烦,要把数据库的数据整来搞去了,有点慢,不过自己习惯了!
发了个以前写的给你,代码很乱,当时是为了赶时间!思路挺简单的,就是通过SQL语句把数据提出来,通过一些加减的办法得到X、Y轴的具体坐标!
ly_crm@163.com 发的这个邮箱!Top
49 楼xiao_p(kkk)回复于 2006-03-09 17:05:46 得分 5
dotnetchart ~~~~
it is good open source component~~Top
50 楼lzgctgc(理引商务)回复于 2006-03-09 17:12:22 得分 0
曲线图我是用GDI来做,画N条曲线都没问题,不过就是处理起有点麻烦,要把数据库的数据整来搞去了,有点慢,不过自己习惯了!
发了个以前写的给你,代码很乱,当时是为了赶时间!思路挺简单的,就是通过SQL语句把数据提出来,通过一些加减的办法得到X、Y轴的具体坐标!
ly_crm@163.com 发的这个邮箱!
--------------------------------------------------------------------------------
代码已经收到,感谢中......
等下我看看代码能不能用在我现在的项目中Top
51 楼blackhero(黑侠客)回复于 2006-03-09 17:16:59 得分 5
http://www.cnblogs.com/jmtek/archive/2006/02/23/336073.html
好用Top
52 楼shao0408(风)回复于 2006-03-09 17:30:18 得分 0
MARKTop
53 楼ChengKing((.net: http://blog.csdn.net/ChengKing ))回复于 2006-03-09 21:16:09 得分 0
Component One WebChart:
http://blog.csdn.net/ChengKing/category/146827.aspxTop
54 楼triffang(冲凉不除3)回复于 2006-03-09 22:03:17 得分 0
MARKTop
55 楼dfkjewyoldfjkleoe()回复于 2006-03-09 22:13:41 得分 0
帮顶!
╭=========================================╮
80G海量源代码,控件,书籍全免费狂下不停!
http://www.source520.com
个人网站站长开发推广同盟,让所有人知道你的世界!
http://www.source520.com/search/search.asp
╰=========================================╯Top
56 楼maple_leafs(我想用好.net)回复于 2006-03-09 22:19:47 得分 0
学习
帮顶Top
57 楼softfire007(为天下美女幸福而生!)回复于 2006-03-09 22:57:21 得分 0
crystal reportTop




