Recommended: Getting Started with WebClass (1) 1. Introduction to WebClass: WebClass is a VB component that resides on WEB SERVER and responds to browser inputs. For users, an IIS application seems to be composed of a series of HTML pages. For developers, an IIS application
In our work, we often need to convert data into bar charts, pie charts, etc. to facilitate and intuitive analysis of data. Here I will introduce to you a component that makes pie charts and bar charts in ASP: csDrawGraph, csdgt.zip. Because it is a component, we need to register with REGSVR32.EXE before using it. csDrawGraph, which can create pie charts, bar charts and line charts in ASP. The supported formats include GIF, PNG, JPG and BMP.
chartdemo.asp
| <%@ language=vbscript %> <html> <head> <title>csDrawGraph Demonstration</title> </head> <body bgcolor=#FFFFFF> <P>This simple demonstration shows two graphs using the same data. The first is a bar chart:</P> <P align=center><IMG src=chartimages.asp?Type=Bar width=400 height=300> </P> <P align=left>The second is a pie chart. The background colour is set to light grey to show the overall size of the image.</P> <P align=center><IMG src=chartimages.asp?Type=Pie width=400 height=300> </P> </body> </html> |
chartimages.asp
<%@ language=vbscript %> <% Response.Expires = 0 Response.Buffer = true Response.Clear Response.ContentType = Image/Gif Set Chart = Server.CreateObject(csDrawGraphTrial.Draw) Chart.AddData NO> 1, 17, ff0000 Chart.AddData NO> 2, 28, 00ff00 Chart.AddData NO> 3, 5, 0000ff If Request.QueryString(Type) = Pie Then Chart.Title = Sample Pie Chart Chart.BGColor = eeeeee Chart.LabelBGColor = eeeeee Chart.TitleBGColor = eeeeee Response.BinaryWrite Chart.GifPie Else Chart.Title = Sample Bar Chart Response.BinaryWrite Chart.GifBar End If Response.End %> |
lines.asp:
<html> <head> <title>Line graph showing all the results</title> </head> <body> <table align=center width=400> <tr><td colspan=4><img src=gif_lines.asp width=400 height=300></td></tr> </table> <p>Links to the other result pages:</p> <p><a href=barsbyday.asp>Bar chart showing all results for any one day</a>.</p> <p><a href=barsbycolour.asp>Bar charts showing results for each colour separately</a>.</p> </body> </html> |
gif_lines.asp:
Share: IIS6.0 ASP Error Analysis Event ID Description 0100 Out of memory. The required memory cannot be allocated.
2 pages in total Previous page 12 Next page