ChartDirector Ver 4.1 (ColdFusion Edition)

PolarChart.addVectorLayer


Usage

addVectorLayer(rData, aData, lengths, directions [, lengthScale [, color [, name ]]])

Description

Adds a vector layer to the chart.

The vectors are specified as 4 data series, representing the radial and angular coordinates of the reference points to put the vectors, and the lengths and directions of the vectors.

By default, the vector starts from the reference point and points away from it. You may use PolarVectorLayer.setArrowAlignment to specify other options, such as for the vectors to point into the reference point, or to have the reference as a pivot at the mid-point of the vector.

ChartDirector supports specifying vectors lengths as pixels or in axis scale. The unit is specified by using the following predefined constants.

ConstantValueDescription
PixelScale0The unit is measured in pixels.
RadialAxisScale2 The unit is measured in the radial axis scale.

Arguments

ArgumentDefaultDescription
rData(Mandatory)An array of numbers representing the radial coordinates for the reference points of the vectors.
aData(Mandatory)An array of numbers representing the angular coordinates for the reference points of the vectors.
lengths(Mandatory)An array of numbers representing the lengths of the vectors, in unit as specified in the lengthScale argument.
directions(Mandatory)An array of numbers representing the direction of the vectors as a clockwise angle in degrees, where 0 is upward pointing direction.
lengthScalePixelScaleThe unit for the lengths, which must be one of the predefined constants in the table above.
color-1The color to draw the data points. -1 means that the color is automatically selected from the palette.
name""The name of the layer. The name will be used in the legend box, if one is available. An empty string means the layer has no name.

Return Value

A PolarVectorLayer object representing the vector layer created.