Bar charts ver. 1.5

    Custom JSP tags library. Library contains two tags for bar charts: Hbar (horizontal bar) and Vbar (vertical bar). You have to provide a set of values (format is double) and optionally a set of labels.
Values (labels) could be provided as a commas separated list, a collection (array, enumeration, collection, vector, iterator) or as a name for the object in the page (request, session, application) scope.

    Parameters are:

    1) values - Optional parameter. Provides a commas separated list of data.
    2) valuesObject - Optional parameter. Provides a collection (enumeration, vector, iterator, array) with values.
    3) valuesName - Optional parameter. Provides a name for your values object (commas separated string) in the page (request, session, application) scope.
    4) labels - Optional parameter. Provides a commas separated list of labels. By default is empty (no labels).
    5) labelsObject - Optional parameter. Provides a collection (enumeration, vector, iterator, array) with labels.
    6) labelsName - Optional parameter. Provides a name for your labels object (commas separated string) in the page (request, session, application) scope.
    7) bgcolor - Optional parameter. Describes a color for the background. Default value is #FFFFFF (white)
    8) fgcolor - Optional parameter. Describes a color for the foreground. Default value is #000000 (black)
    9) width - Optional parameter. Describes a width. Default value is 125
    10) height - Optional parameter. Describes a height. Default value is 125

For example:

1) Horizontal bar
 

<%@ taglib uri="taglib.tld" prefix="bar" %>

<br><bar:Hbar values="7,4,12" fgcolor="#FF0000" width="220" labels="Orange,Apple,Pear" bgcolor="#0000FF"/>

and output is:

  
Orange 
   
Apple 
   
Pear 
   
  

2) Vertical bar
 

<%@ taglib uri="taglib.tld" prefix="bar" %>

<br><bar:Vbar values="7,4,12" fgcolor="#FF0000" bgcolor="#0000FF"/>

and output is:

 
 
 
 
 
 
 
 
 
 
 
 
 

Note: The evaluation version supports up to five data elements

for downloading:

Library: bartag.jar    Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.