Dial customizations
The dial parameters that you specify tell the server how to draw the dial image. These parameters specify that the dial needle is in the correct location, is the correct length, and has the correct angle.
When specifying parameters, note the following:
- You must specify the location of the minimum and maximum scale.
- The tic locations for threshold one and threshold two must be consistent.
- You must specify the offset from the center of the image.
- You must specify the arc bounding box, which is the rectangle that defines the region in which the needle is drawn.
- The center of the bounding box defines the center of the needle's swing.
- The needle moves clockwise when you specify larger values.
- If you use the dial defaults and maintain the ratios of dial.gif, you
can change the image and not have to specify any options.
All parameters are relative to the actual size of the image.
This table shows each parameter that you can use to customize a dial, its corresponding description, and the parameter's valid values.
Parameter | Description | Valid Values |
---|---|---|
img | This parameter specifies the base name of the image. | Any valid GIF or JPEG image. |
dialType | This parameter overrides the calculated image prefix name. This parameter is useful to display a table that is not the result of a condition. |
|
sweepRad | This parameter defines the sweep radius, which is the length in pixels of the
needle from the center of the arc bounding box. If you specify this parameter, the resulting needle will sweep a circle regardless of the image's width and height ratio. If you specify a value of zero, the arc bounding box is set to be half the height of the image and half the width of the image. |
Integer in pixels The default is zero. |
boxX | This parameter specifies the X coordinate of the bounding box used to contain the arc of the dial's needle. | Integer in pixels The default is one-quarter of the image's width. |
boxY | This parameter specifies the Y coordinate of the bounding box used to contain the arc of the dial's needle. | Integer in pixels The default is one-quarter of the image's height. |
boxW | This parameter specifies the width of the bounding box used to contain the arc of the dial's needle. |
nteger in pixels The default is one-half of the image's width. |
boxH | This parameter specifies the height of the bounding box used to contain the arc of the dial's needle. | Integer in pixels The default is one-half of the image's height. |
ctrDia | Setting this parameter prevents the needle from being drawn in the very center of the image. Setting this parameter also provides the image with a spindle around which the needle appears to rotate. | Integer in pixels The default is 9% of the image's width. |
arcStart | This parameter specifies the start position in degrees of the dial's scale. The number you specify determines the location where the minimum scale value is drawn. Any value smaller than the value you specify will be clamped to this location. | Number in degrees. The default is 30. Zero degrees is the six o'clock position and 90 degrees is the nine o'clock position. |
arcLength | This parameter specifies the location where the maximum scale value is drawn. The
number you specify is the number of degrees from the arcStart to the maximum
scale. Any value larger than the value you specify will be clamped to this location. |
Number in degrees. The default is 300. 360 degrees swings the needle all the way around to the starting point. |
debug | If you set this value to true, the arc bounding box is
dawn in magenta, a white line at the minimum scale of the dial, and a black line is
drawn full scale. This parameter is useful when you are setting up a new image's options. |
The default is false. |