ChartDirector 6.0 (Perl Edition)
BaseMeter.addColorScale
Usage
Description
0.0, 0x0000ff, 50.0, 0xffff00, 100.0, 0xff0000
0.0, 0xff000, 50.0, 0x00ff00, 100.0
Arguments
Argument | Default | Description |
---|---|---|
colorStops | (Mandatory) | An array of numbers alternating between values and colors. If the number count is even, the array will define a continuous color scale, otherwise it will define a step color scale. |
startPos | -0x7fffffff | The position of the starting point of the color scale. For an angular meter, the position refers to the radius, and the default is the meter scale radius (see AngularMeter.setMeter). For a linear meter, the position refers to the x or y coordinate depending on whether the meter is vertical or horizontal, and the default is the leftX or topY coordinate of the meter scale (see LinearMeter.setMeter). |
startWidth | -0x7fffffff | The width at the starting point of the color scale. A positive value means the width is in the direction of increasing "position", while a negative value means decreasing "position". Please refer to the description of startPos on the meaning of "position" for various types of meters. The default is the length of the major tick (see BaseMeter.setTickLength). |
endPos | -0x7fffffff | The position of the ending point of the color scale. Please refer to the description of startPos above on how the position parameter is interpreted. The default is for the ending position to be equal to the starting position. |
endWidth | -0x7fffffff | The width at the ending point of the color scale. Please refer to the description of startWidth above on how the width parameter is interpreted. The default is for the ending width to be equal to the starting width. |
edgeColor | -1 | The edge color of the color scale. The default is to have no edge. |
Return Value