ChartDirector 6.0 (C++ Edition)

PolarChart.addVectorLayer

Usage

PolarVectorLayer *addVectorLayer(DoubleArray rData, DoubleArray aData, DoubleArray lengths, DoubleArray directions, int lengthScale = PixelScale, int color = -1, const char *name = 0);

Description

Adds a vector layer to the chart.

By default, the vectors start from the given reference points and point away from it. You may use PolarVectorLayer.setArrowAlignment to specify other options, such as for the vectors to point into the reference points, or to have the reference points being the mid-points of the vectors.

ChartDirector supports specifying the vector lengths and directions directly, or indirectly as the lengths and directions from the reference points to the reference end points. This is controlled by**lengthScale** as described in the following table.

By default, the vectors start from the given reference points and point away from it. You may use PolarVectorLayer.setArrowAlignment to specify other options, such as for the vectors to point into the reference points, or to have the reference points being the mid-points of the vectors.

ChartDirector supports specifying the vector lengths and directions directly, or indirectly as the lengths and directions from the reference points to the reference end points. This is controlled by

Constant | Value | Description |
---|---|---|

PixelScale | 0 | The lengths are measured in pixels. The angles are measured clockwise in degrees, with the upwards position as 0. |

RadialAxisScale | 2 | radial axis scale |

EndPoints | 3 | The vector lengths and directions are measured as the lengths and directions between the reference points and the reference end points. |

Arguments

Argument | Default | Description |
---|---|---|

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 either the lengths of the vectors or the radial coordinates of the reference end points, depending on lengthScale. |

directions | (Mandatory) | An array of numbers representing either the directions of the vectors or the angular coordinates of the reference end points, depending on lengthScale. |

lengthScale | PixelScale | The method to specify vector lengths and directions, which must be one of the predefined constants in the table above. |

color | -1 | The 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.

© 2017 Advanced Software Engineering Limited. All rights reserved.