ChartDirector 6.0 (Ruby Edition)

AngularMeter.addScaleBackground


Usage

addScaleBackground(bgRadius, fillColor [, edgeWidth [, edgeColor [, scaleRadius [, startAngle [, endAngle ]]]]])

Description

Adds a background to the meter scale.



In the example below, the sky blue background with the dark blue border is the scale background.

The scale background is a circle segment (a circle with a part cut-off by a chord). Its radius is usually configured as larger than that of the meter scale. In this case, its angular span will also be larger than that of the meter scale. In the above sample, the meter scale spans 180 degrees. The scale background spans more than 180 degrees so that it can maintain a margin at the bottom side (the chord side).

Arguments

ArgumentDefaultDescription
bgRadius(Mandatory)The radius of the circle segment to be used as the scale background.
fillColor(Mandatory)The fill color of the circle segment (the background color).
edgeWidth0The edge width of the circle segment. A positive width means the edge is internal to the circle segment. A negative width means the edge is external to the circle segment.
edgeColor-1The edge color. The default value of -1 means the edge color is the same as the fill color.
scaleRadius-0x7fffffffThe radius of the meter scale. ChartDirector uses this value to compute the extra angular span the circle segment must have in order to maintain proper margin at the chord side. This argument is usually not necessary as ChartDirector already know the scale radius from the meter configuration. This argument can be used if you would like to use a "fake" scale radius to draw the scale background for special effects.
startAngleNoValueThe start angle of the meter scale. ChartDirector uses this value to compute start angle of the circle segment. This argument is usually not necessary as ChartDirector already know the start angle from the meter configuration. This argument can be used if you would like to use a "fake" angle to draw the scale background for special effects.
endAngleNoValueThe end angle of the meter scale. ChartDirector uses this value to compute end angle of the circle segment. This argument is usually not necessary as ChartDirector already know the end angle from the meter configuration. This argument can be used if you would like to use a "fake" angle to draw the scale background for special effects.

Return Value

None