Soren Winslow
Simple Bar Graph
This script shows how to create a simple bar graph based on numbers pulled from a database. In this example, it will calculate which days this web site gets the most page visits. However, you can use it to display just about any kind of data you wish. It will take the highest number or percentage and use that as your base of 100%. This is almost the same script that I have used at Elvis-Is-Alive.com for the poll. This script also generates a random color for each graph.

Here is the ASP code for this script:

Sunday
12.37%
Monday
14.94%
Tuesday
16.32%
Wednesday
15.36%
Thursday
16.81%
Friday
13.24%
Saturday
10.97%
© 1967 - 2008 Soren Winslow