ChartDirector 7.0 (ASP/COM/VB Edition)



relativeRadialGradient(gradient [, radius ])


Creates a radial gradient color relative to the meter center and radius.

A general radial gradient color can be created by BaseChart.radialGradientColor2, which involves specifying the center x and y coordinates, horizontal and vertical radii, and the color stops. The relativeRadialGradient simplifies creating a radial gradient by assuming the center of the radial gradient to be the meter center, and the radial pattern is circular (so that the vertical and horizontal radii are the same), and default to using the meter scale radius (set by AngularMeter.setMeter) as the reference radius.

The radial gradient is defined using an array of numbers, in which each pair of numbers represents the relative radius and its associated color. The relative radius is the ratio of the absolute radius to the reference radius.

For example, to define a radial gradient with blue (0000FF) at the center, green (00FF00) at the mid-point between the center and the reference radius, and red at the reference radius, the numbers should be:

0.0, &H0000ff, 0.5, &H00ff00, 1.0, &Hff0000

Note: The above hexadecimal numbers are based on VB syntax. Other programming languages may use other methods to specify hexadecimal numbers. For example, in Javascript, "0x" is used instead of "&H".

The relative radii in the array must be arranged in increasing order. It is possible to define a relative radial gradient smaller or larger than the reference radius by using a relative radius smaller or greater than 1.


gradient(Mandatory)An numeric array defining the color stops. Please refer to the description above for details.
radius-1The reference radius of the radial gradient. The default is the meter scale radius (set by AngularMeter.setMeter).

Return Value

A 32-bit integer representing the radial gradient color.