Results 1 to 3 of 3

Thread: How to use ASP to draw graph?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    2
    How to use ASP to draw graph for example bar graph and so on?

  2. #2
    Guest
    I don't know how to generate on-the-fly graphics with an ASP but one way you could do this is to use some dynamically generated tables. Below is an example of how this could be done:

    Code:
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <TITLE>test.asp</TITLE>
    </HEAD>
    <BODY>
    
    <TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0">
    <%
    Dim intIndex
    Dim intRandomValue
    Dim strHTML
    
    Randomize
    
    For intIndex = 1 To 10
      intRandomValue = Int(Rnd * 400) + 1
      strHTML = strHTML & "<TR>"
      strHTML = strHTML & "<TD>" & intRandomValue & "</TD>"
      strHTML = strHTML & "<TD><TABLE BORDER=""0"" CELLPADDING=""0"" CELLSPACING=""0"">"
      strHTML = strHTML & "<TR><TD BGCOLOR=""000080"" HEIGHT=""16"" WIDTH=""" & intRandomValue & """</TD></TR>"
      strHTML = strHTML & "</TABLE></TD>"
      strHTML = strHTML & "</TR>" & vbcrlf
    Next
    
    Response.Write strHTML
    %>
    </TABLE>
    
    </BODY>
    </HTML>
    A variation on this might populate the inner table with a number of small graphics if solid colors don't work for you. Dunno if this will help you.

    Good luck,
    Paul

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    2

    How can I call Excal to draw a graph?

    Actually what I want is to draw a pie to represent the percentage of my input.

    How can I "link" my ASP to Excel or other software that enable me to draw a graph. Or how can I call Excel to draw a graph by using ASP.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width