(target measure gauge) and
(trend icons).
Two types of gauges are currently available, a target measure bar and a trend icon.
| Type of Gauge | Name | What it Does | Example |
|---|---|---|---|
| Target Measure Bar | tambar |
Shows the actual state of a measure in a bar. The bar has two parts, the upper thick bar shows the actual value, the lower thin bar shows the scale of the gauge. For example regions with a relative distribution of bad (red), acceptable (yellow) and good (green) values | |
| Trend Icon | trend |
Shows the up trend, no change and down trend of a measure | |
0, 10, 20, 40 has a red region with range 0...10, a yellow one with range 10...20 and a green one with range 20...40.
The upper value region (the thick bar) has two colors, a dark color used for actual value and a light color for filling out the rest of the gauge with a lighter color.
The %GAUGE{...}% variable gets expanded to an image representing the gauge. Parameters and global settings determine the type of gauge, dimensions, scale and values.
%<plugin>_<setting>%, for example, %INTERWIKIPLUGIN_SHORTDESCRIPTION%
data/debug.txt. Default: 0 tambar, trend. Default: tambar %GAUGE{...}% variable gets expanded to an image representing the gauge.
| %GAUGE{}% Parameters |
Comment | Default |
|---|---|---|
type="tambar" |
The type of gauge to be used, tambar for target measure bar, or trend for trend icon |
Global TYPE setting |
name |
Name to uniquely identify the gauge file that is auto-created. | None; required for tambar (not required for trend) |
value |
For tambar: The actual value of the gaugeFor trend: Positive = arrow up, 0 = arrow right, negative = arrow down |
None. Show "no data" if missing |
alt |
Alternate text for image | Value is value parameter |
width |
Defines the width of the gauge in pixels. | Global <type>_WIDTH setting |
height |
Defines the height of the gauge in pixels. | Global <type>_HEIGHT setting |
scale |
For tambar: Defines the number and position of the scales. For example a value of "5, 12, 35, 57" denotes that there are three regions on the bar gauge, "5...12", "12...35" and "35...57". For trend: N/A |
Global <type>_SCALE setting |
colors |
For tambar: List of colors, each region has two colors. For trend: N/A |
Global <type>_COLORS setting |
| Type of gauge | You type | You should get... | ...if installed |
|---|---|---|---|
| Target Measure Bar | %GAUGE{ type="tambar" name="t1" scale="0, 10, 20, 40" value="27" }% |
|
|
| Trend Icon | %GAUGE{ type="trend" name="t2" value="-3" }% |
|
|
%PUBURLPATH%/%WEB%/%TOPIC%/_GaugePlugin_<type>_<name>.png
%GAUGE{...}% gets expanded to an <img ... /> image tag.
GaugePlugin.zip in your twiki installation directory. Content: | File: | Description: |
|---|---|
lib/TWiki/Plugins/GaugePlugin.pm | Plugin Perl module |
data/TWiki/GaugePlugin.txt | Plugin topic |
data/TWiki/GaugePluginTests.txt | Test page containing many examples of the GaugePlugin in action. Also shows various error conditions |
data/TWiki/VarGAUGE.txt | Variable documentation topic |
pub/TWiki/GaugePlugin/tambar1.gif | Sample tambar image |
pub/TWiki/GaugePlugin/trenddn.gif | trend down arrow |
pub/TWiki/GaugePlugin/trendeq.gif | trend no change arrow |
pub/TWiki/GaugePlugin/trendup.gif | trend up arrow |
pub/TWiki/GaugePlugin/trendnd.gif | trend error message if value is not specified |
configure in your TWiki installation, and enable the plugin in the {Plugins} section.
| Plugin Author: | TWiki:Main/PeterThoeny |
| Copyright: | © 2002-2010, TWiki:Main/PeterThoeny © 2008-2010, TWiki:TWiki/TWikiContributor |
| License: | GPL (GNU General Public License |
| Plugin Version: | 2010-05-06 |
| Change History: | |
| 2010-05-06: | TWikibug:Item6433 |
| 2010-05-05: | TWikibug:Item6419 |
| 2010-04-08: | TWikibug:Item6420 |
| 01 May 2003: | Added time stamp to image to prevent browser from caching images; ignore non-numerical chars in value parameter; fixed warnings (V1.002) |
| 08 Sep 2002: | Added missing binmode (for Windows); pass parameters also to error image (V1.001) |
| 23 May 2002: | Initial version (V1.0) |
| 16 May 2002: | Initial spec (V1.0) |
| Dependencies: | gd graphics library, http://www.libgd.org/ libpng PNG graphics library, http://www.libpng.org/pub/png/libpng.html |
| CPAN Dependencies | CPAN:GD |
| Perl Version: | 5.005 |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/GaugePlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/GaugePluginDev |