SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Resource

HTML Bar Charts


Sponsored Links
Developer's Paradise : Inside Technique :
HTML Bar Charts
Submission by SiteExperts Staff

Go to the resource:
HTML Bar Charts

Add to Assistant

Short Description
Client and server techniques for creating bar charts using tables that display in most browsers.

Long Description
Learn techniques for creating bar charts from standard HTML tables that work in all browsers. We use this technique for displaying the results of our discussion forum surveys (see results for target resolution survey). In this article, we provide both a server-based solution using VBScript and ASP as well as a client-side JavaScript object-based solution.

Author
Scott Isaacs
Date/ Version
2/21/1999
Submission URL
http://www.SiteExperts.com/tips/contents/ts13/page1.asp
Submission Date
Feb 21,1999
Last Update
Feb 21,1999
Related To
Inside Techniques
 

Discussion and Rate this Resource
Overall Rating: 4.1

Dakota1 on Jan 18, 2000 at 10:59:47 PMNo Rating
This article is <font size="3">GREAT</font>. There are a bunch of typos that will take some time to sort through, but for an ASP app that accesses a DB, the benfits are worth the time it takes to fix the code.
bastian on Aug 19, 1999 at 7:14:09 AMRating: 4

The generated barchart in the server-side script is invisible when printed. To solve this, create two gifs, darkgreen.gif and darkred.gif, and replace this first block of code:

str = str & "<TD valign=middle><TABLE><TR><TD bgcolor="
    ' Set bar color
    if iPercent > 50 then
      str = str & "darkgreen"
    else
      str = str & "darkred"
    end if
    str = str & "><IMG SRC='/gifs/s.gif'  width=" & ((iPercent/100)*barSize) & " height=5>"

with this:

str = str & "<TD valign=middle><TABLE><TR><TD>"
   
' Set bar color
 if iPercent > 50 then
       gif = "'darkgreen.gif'"
     else
       gif = "'darkred.gif'"
     end if
   
 str = str & "<IMG SRC=" & gif & "width=" & ((iPercent/100)*barSize) & " height=5>"

ligt on Jul 21, 1999 at 5:50:32 AMRating: 4
Really nice work, which saves network loading and server resources for images
generation from simple data.
What about making a Pie then ?
Compliments !
ssilvius on Apr 27, 1999 at 9:31:41 AMRating: 5
an easy soulotion to a complex idea. Good Job.
satya on Apr 13, 1999 at 1:45:23 AMRating: 2

good,

 

More Ratings/ Comments


To rate and comment on a resource, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password

Copyright © 1997-2008 InsideDHTML.com, LLC. All rights reserved.