Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating graphical charts for performance?

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
I want to make a "stats" page for the administration here. Want to monitor the ammount of users over a given time and usage of certain aspects on the site over periods of time (days, weeks, etc).

I haven't run into a need for this before, so I'm not exactly sure how to implement this. Does anyone know of an easy way to create graphical charts based on the criteria? (ex: bar chart showing ammount of users logged on, a week ago, 2 weeks ago, 3 weeks ago, etc) I really don't want to have to make new charts continuously....would very much like it to be automatically updated.

Anyway and all help is greatly apprecieated! -Ovatvvon :-Q
 
well if you don't want anything fancy i would suggest just creating a couple of small .gif files that are like 20x20 pixels make it a color and use your td width and height attributes to create your graph.

Example:
<%
IF not Isempty(Request.Querystring(&quot;PageID&quot;)) then
RSData = conn.Execute(&quot;SELECT NumberUsers, PageName FROM UsageQuery WHERE DateAccessed > #&quot; & Request.QueryString(&quot;Date&quot;) & &quot;#
else
RSData = conn.Execute(&quot;SELECT NumberUsers, PageName FROM UsageQuery WHERE DateAccessed > #&quot; & Request.QueryString(&quot;Date&quot;) & &quot;# AND PageID=&quot; & Request.Querystring(&quot;PageID&quot;)
end if
RSMaxNumber = conn.Execute(&quot;SELECT MaxNumber FROM UsageQuery&quot;)
NumberOfDays=Date()-Request.Querystring(&quot;Date&quot;)
%>
<body>
<table width=&quot;100%&quot;>
<tr>
<td width=&quot;25%&quot;>
<b>Page Name:</b>
</td>
<td width=&quot;75%&quot;>
<b>Number of Users</b>
</td>
</tr>
<%x=1%>
<%DO UNTIL RSData.EOF%>
<tr>
<td><b><%response.write x%></b>
<%response.write RSData(&quot;PageName&quot;)%>
</td>
<td>
<img border=&quot;0&quot; src=&quot;../bar.gif&quot; width=&quot;<%response.write (RSData(&quot;NumberUsers&quot;)/RSMaxNumber(&quot;MaxNumber&quot;))*100%>&quot;>
</td>
</tr>
<%
x = x + 1
RSData.MoveNext
loop
%>

of course this can be modified to adjust to your needs
 
that is supposed to be
<img border=&quot;0&quot; src=&quot;../bar.gif&quot; width=&quot;<%response.write (RSData(&quot;NumberUsers&quot;)/RSMaxNumber(&quot;MaxNumber&quot;))*100%>%&quot; height=&quot;24&quot;>
 
hey guys

Thread333-275111

Check out the link on the thread

Hope this helps every one

Regards
Niraj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top