Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Classic ASP Graphs

Posted on 2012-04-11
5
Medium Priority
?
278 Views
Last Modified: 2012-04-11
Hello Experts,

Can any one recomend a simple tool that I can use to generate graphs using Classic ASP.  I'm on a dedicated server (Win2003), so I'm able to' install anything
0
Comment
Question by:APD_Toronto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 2000 total points
ID: 37834787
You can try the following:

Google Charts
https://developers.google.com/chart/

OR this:

http://community.spiceworks.com/scripts/show/1058-two-series-bar-chart-in-classic-asp-vbscript


You can also look into generating graphs using SVG


What kind of graph are you looking for anyway?

I did one years ago.

I can dig through my archives and see if I can find them.
0
 

Author Comment

by:APD_Toronto
ID: 37834822
Nothing to complex,.  

I have a date range, say April 11 to April 29, so I need to show sales for each of those 18 days.
0
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 37835648
This is a code I found in my archive. You can modify to suit your needs.

           <%



                Function RndBGColor()



   Randomize Timer



     TheRed = Hex(Int(Rnd * 8) * 16)

     If Len(TheRed) = 1 Then

        TheRed = CStr("0" & TheRed)

     End If



     TheGreen = Hex(Int(Rnd * 8) * 16)

     If Len(TheGreen) = 1 Then

        TheGreen = CStr("0" & TheGreen)

     End If



     TheBlue = Hex(Int(Rnd * 8) * 16)

     If Len(TheBlue) = 1 Then

        TheBlue = CStr("0" & TheBlue)

     End If



     RndBGColor = TheRed & TheGreen & TheBlue



   End Function



   Function BdrColor(BGColor)



     TheRed = Left(BGColor,2)

     TheGreen = Mid(BGColor,3,2)

     TheBlue = Right(BGColor,2)



     TheRed = CInt("&H" & TheRed)

     TheGreen = CInt("&H" & TheGreen)

     TheBlue = CInt("&H" & TheBlue)



     TheRed = Hex(TheRed + 127)

     TheGreen = Hex(TheGreen + 127)

     TheBlue = Hex(TheBlue + 127)



     BdrColor = TheRed & TheGreen & TheBlue



   End Function





   BaseNum = 0

   TotalNum = 0

   x = 0

   TheColor = "000000"



   Response.Write "<table style=" & chr(34) & "width:100%;border-style:none;" & chr(34) & ">" & chr(10)

set Conn = server.CreateObject("ADODB.Connection")
set objRS =server.CreateObject("ADODB.Recordset")
Conn.ConnectionString= "Provider=microsoft.jet.oledb.4.0;Data source=" & server.mappath("Calendar.mdb")
objRs.CursorLocation = 3
Conn.Open



   SqlStr = "SELECT WhenVisit AS WkDayNum, " & _

            "Count(WhenVisit) AS NumVisits " & _

            "FROM PageVisits " & _

            "GROUP BY WhenVisit " & _

            "ORDER BY WhenVisit"

    objRs.Open SqlStr,Conn,3,2


   While Not Objrs.EOF



     TotalNum = TotalNum + objrs("NumVisits")

     If objrs("NumVisits") > BaseNum Then

        BaseNum = objrs("NumVisits")

     End If



   Objrs.MoveNext

   Wend

   objrs.Close

   objrs.Open SqlStr, Conn, 3,2

   While Not Objrs.EOF

      BGColor = RndBGColor()

      ThePerc = FormatNumber((objrs("NumVisits")/TotalNum)*100,2)

      TheWidth = FormatNumber((objrs("NumVisits")/BaseNum)*100,0)



      Response.Write "<tr>" & chr(10) & _

                     "<td style=" & chr(34) & "text-align:left;font-size:10pt;padding:3px;" & chr(34) & ">" & chr(10) & _

                          "<div style=" & chr(34) & "width:" & TheWidth & "%;background-color:#" & BGColor & ";color:#ffffff;font-size:10pt;font-weight:bold;border-style:outset;border-width:2px;border-color:#" & BdrColor(BGColor) & ";padding:3px;" & chr(34) & ">" & chr(10) & _

                          objrs("WkDayNum") & "<br>" & ThePerc & "%" & chr(10) & _

                          "</div>" & chr(10) & _

                     "</td>" & _

                     "</tr>"

     x = x + 1

   objrs.MoveNext

   Wend



   objrs.Close

   Set objRS = Nothing



   Response.Write "</table>"



           %>

Open in new window

0
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 37835651
sorry, I posted before I saw your post.

I suppose one of those links worked for you.
0
 

Author Comment

by:APD_Toronto
ID: 37835655
Google is EASY.  Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question