This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


The ProgressBarPlugin creates a graphical representation of a percentage number. Setting the percentage to "X" will create a bar with the left X% of its width draw in green and the remaining (1 - X)% in red. The bar is implemented as two "img" entries aligned inside a table cell, with the same height, and with the width calculated based on the "width" and "percentage" parameters.

The typical usage is to indicate how close to completion a given task is in a project management situation; other uses include representing the number of testcases succesfully executed, the percentage of code covered by unit tests, and so on.

This plugin is a very simple extension of the Image plugin created by JanneJalkanen. Most of the parameters are the same. For simplicity I am also using the same package name as the other standard JSPWiki plugins.


percentage = 'Percentage'
The percentage number that the bar should reflect[1].
src_left = 'Image source(left)'
This can either be a full URL (http://..) or a WikiAttachment. name. If not provided, "images/green.png" will be used. Copy the attached file to the "images" directory under you wiki installation.
src_right = 'Image source(right)'
This can either be a full URL (http://..) or a WikiAttachment. name. If not provided, "images/red.png" will be used. See above.
align = 'left|right|center'
The image alignment.
height = 'integer'
The height of the image. If not provided a default value will be used.
width = 'integer'
The combined width of the bar. If not provided a default value will be used[1].
caption = 'caption text'
The text that should be shown as a caption under the image.
link = 'hyperlink'
A hyperlink (http://..)..
border = 'integer'
Size of the image border.
style = 'style info'
Any style markup you would like to apply to the table surrounding the image.
class = 'class name'
Redefine the default class for this image, which is "imageplugin".

The alt text of the image is always set to reflect the percentage number.


[{ProgressBar percentage=30 }]
Shows a progress bar reflecting a 30% completion rate.


The table that encompasses the image. It consists of two subcategories:
img = IMG tag that gets embedded.
caption = caption that is embedded.

[#1] Use only an integer number; in particular, do not attach a '%' character.


Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java 7.4 kB 1 04-Aug-2004 22:14 NascifAbousalhNeto
ProgressBarPlugin.jar 3.0 kB 3 15-Sep-2006 21:54 Joseph Schmigel
zip 303.6 kB 1 12-May-2005 12:56
green.png 0.2 kB 1 04-Aug-2004 22:13 NascifAbousalhNeto
red.png 0.2 kB 1 04-Aug-2004 22:13 NascifAbousalhNeto
« This particular version was published on 02-Oct-2004 09:25 by FosterSchucker.