Home » Projects » ASP Graphs

ASP Graphs

**DISCLAIMER**

I wrote this page and these scripts back in 2003, and haven't looked at them or touched them since that time.  However I have noticed on my logs quite a few hits for this old page, so I have reinstated it.  I may revisit the code, or I may just start it again, but time is not my friend at the moment, so don't get too excited!

All code is provided "as is" and no responsibility will be assumed if you use any code from this site in a production environment and anything goes wrong.

**END DISCLAIMER**

The following code will display a bar graph. It's completely customisable and dynamic. Just parse 5 variables to this function and you have any "counting" graph you want! Basically you can select any text field from any table in any database you want abd the function will work out all the options, count them and display them in a grpahical format with your chosen x any y axis labels and in your chosen colour.

Numerical and stacked versions are coming soon!

Also planning on doing some more commenting and making it a Sub not a Function.

The code counts like values and displays like the following (click the image for a live demo):

Instructions:

  • See the file for now! Pretty well explained in there

Versions:

  • Version 1.2:
    Added ability to make completely customised graphs by the user as well as specified graphs by the webmaster. Full list of features now stands as
    • Access any form of database using dsn or a custom connection string
    • Webmaster specified tables to acces
    • Webmaster can specify any number of uncustomisable graphs
    • User can select any field from database
    • User can choose any colour for the graph. List is made from contents of "pixels" directory so webmaster can limit the colours available to fit into the site's colour scheme
    • User can label x and y axes and choose whether to show labels horizontally or vertically or not at all
    • Included support for CSS2 vertical text as well as backward compatibility
    • Now uses the QueryString so links can be sent to people of graphs!
  • Version 1.1:
    Some tidying and improvement of flexibility
  • Version 1.0:
    Works of a specified list of variables only, must make specific graphs

Click here to download the zip file (version 1.2)

Related Entries

Just Champagne - The Champagne Gift Specialists
It's finally finished (at least this phase!) A labour of love and hate that's ended up with a (so far) rock…
joke