Creating a radar plot is very simple. A radar plot displays a dataset in a polar (”circular”) coordinate system. Coordinates in a polar coordinate system are represented by an angle v and a radius r, and the conversion to a normal (Cartesian) coordinate system is:
x = r * cos(v)
y = r * sin(v)
A radar plots displays some x-value (the x coordinate in the dataset) which is translated to an angle based on the number of points in the dataset (i.e. if there are 8 points in the dataset the angles are 0, 45, 90, 135, 180, 225, 270, 315). The y-value then represents the radius - consider the plot as having an y-axis for each point pointing in the direction of the angle).
Radar plots are also known as Spider plots (since the plot can resemble a spiderweb).
A Radar plot in Image_Graph consists of 2 things:
Creating the plot area is very simple. Normally a plotarea is created using code similar to
$Plotarea =& $Graph->addNew('plotarea');
This is simply changed to creating the Radar plotarea instead of the normal
$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar');
Populating the dataset is done in the normal way, the next difference comes when the plot is added. This is simply accomplished by:
$Plot =& $Plotarea->addNew('radar', $Dataset);
Radar plots does currently not support stacked (or 100% stacked) charts. Multiple radar plots in one graph is supported either by adding many plot objects or using a dataset array as second parameter, in a similar fashion to a normal plot.