最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP Chart 使用范例
时间:2022-06-30 09:35:04 编辑:袖梨 来源:一聚教程网
Simple Chart Example
使用很简单哦,这样就可以了:
用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 "
"
使用很简单哦,这样就可以了:
用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 "
相关文章
- 杠杆、流动性与多头:无人预见的山寨币反弹格局 06-16
- 《战争警戒》美军卡组搭配攻略 06-16
- 《职场浮生记》技能加点攻略 06-16
- 《职场浮生记》第一年全事件汇总 06-16
- 《纸嫁衣5来生戏》全章节图文详解攻略 06-16
- 《小猫咪大城市》蘑菇帽获得方法 06-16