最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP Chart 使用范例
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
使用很简单哦,这样就可以了:
用Server.CreateObject建立对象
设置图表属性
调用SaveChart方法保存到硬盘或者用Response.BinaryWrite Chart.Image直接发送
下面这段代码是示范如何建立一个柱图的:
ctBar = 1
cNone = 0
cGradient =6
rem **********************************************************************
rem * Instantiate the Chart component
rem **********************************************************************
Set Chart = Server.CreateObject ("ASPChart.Chart")
rem **********************************************************************
rem * Add a Bar series with 3 points
rem **********************************************************************
Chart.AddSeries (ctBar)
Chart.AddValue 200, "Regular", vbBlue
Chart.AddValue 233, "Enhanced ", vbRed
Chart.AddValue 260, "Free", vbGreen
Chart.BarStyle = cGradient
rem **********************************************************************
rem * Set the PanelColor, remove the OuterBevel
rem **********************************************************************
Chart.PanelColor = vbWhite
Chart.BevelOuter = cNone
Chart.ChartBGColor = vbWhite
rem **********************************************************************
rem * Set the Width and Height of the image
rem **********************************************************************
Chart.
Chart.
rem **********************************************************************
rem * Set the filename, save the image and write the image tag
rem **********************************************************************
Chart.FileName = "d:inetpubwwwrootimagessmpchrt1.jpg"
'也不知道用Server.MapPath,不知道是笨呢还是图效率高。
Chart.SaveChart
Response.Write ""
-
下一个: 浅谈MsChart在ASP中的应用
相关文章
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- asp中获取日期为星期几的技巧 09-14
- Asp编码优化参考 09-14
- .Net Core认证系统源码解析 12-26
- SharePoint Server 2019新特性介绍 01-15