以下内容从原文随机摘录,并转为纯文本,不代表完整内容,仅供参考。 一个功能强大的图表组件,可以在ASP、VB、.Net等编程环境下使用。 OWC11在Office2003中有提供,如果你还没有安装Office2003,请下载该组件,然后注册owc11.dll,注册方法:regsvr32 保存路径\owc11.dll,即可使用。 以下提供一个ASP+OWC11制作统计图的简单示例 具体方法可以参考官方帮助:http://support.microsoft.com/default.aspx?scid=kb;zh-cn;244049#top <%@ language="vbscript"%> <html> <head> <title>ASP+OWC11制作统计图示例</title> </head> <body> <% Dim oChart, c, Categories(5), Vals(5), i, sCaption 'Generate random categories and values for the chart 'These values can come from some existing data source for i = 1 to 5 Categories(i) = "示例" & CStr(i) Vals(i) = 5 * Rnd(100) next 'Create a Chart Object Set oChart = CreateObject("OWC11.ChartSpace") Set c = oChart.Constants 'Set the different parameters for the ChartSpace oChart.Border.Color = c.chColorNone 'Get Organization number and use it to set the Caption sCaption = "ASP+OWC11制作统计图示例" 'Add a chart and set parameters for the chart oChart.Charts.Add oChart.Charts(0).Type = oChart.Constants.chChartTypeColumnClustered oChart.Charts(0).SeriesCollection.Add oChart.Charts(0).SeriesCollection(0).Caption = sCaption oChart.Charts(0).SeriesCollection(0).SetData c.chDimCategories, c.chDataLiteral, Categories oChart.Charts(0).SeriesCollection(0).SetData c.chDimValues, c.chDataLiteral, Vals oChart.Charts(0).HasLegend = True oChart.Charts(0).HasTitle = True 'Get a temporary filename to save chart in that file sFname = session.SessionID & ".gif" 'Export the chart to the temporary file oChart.ExportPicture server.MapPath(sFname), "gif", 600, 512 'Create a link to the generated file Response.Write "<img src='" & sFname & "'>" %> </body> </html>
- 粉丝: 1
- 资源: 9
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
- 1
- 2
前往页