PolarCoord

The PolarCoord object contains polar coordinates against which data can be represented. To create a PolarCoord object, call the PolarCoord constructor:

var polar = new PolarCoord(rect);

You can pass a RectCoord object to the constructor (as above), or specify this later using the PolarCoord.setCoordinate(coord) property. The following special methods are available:

Example

Chart Component Script
dataset = [["State","Quantity"], ["CA",200], ["NY",300]]; (1)
graph = new EGraph();
var elem = new IntervalElement("Quantity");
var yscale = new LinearScale("Quantity");
var rect = new RectCoord(null, yscale); (2)
var polar = new PolarCoord(rect); (3)
var frame = new CategoricalColorFrame();
var range = new StackRange();
polar.setType(PolarCoord.THETA);
frame.setField("State");
elem.setColorFrame(frame);
elem.setCollisionModifier(GraphElement.MOVE_STACK);
yscale.setScaleRange(range);
var spec = new AxisSpec();
spec.setLabelVisible(false);
spec.setTickVisible(false);
spec.setLineVisible(false);
yscale.setAxisSpec(spec);
graph.setCoordinate(polar); (4)
graph.addElement(elem);
1 See dataset to use a data block instead of an array literal.
2 Create the RectCoord object.
3 Create the PolarCoord from the RectCoord object.
4 Use EGraph.setCoordinate(coord) to add the Coordinate to the Chart.

PolarCoordsExample2

Script that modifies the graph or dataset properties should be placed on the Chart component itself. See Add Component Script for more information. This script has access to the Chart data and Chart API methods. Scripted Charts are not good candidates for user-modification, so you should deselect ‘Enable Ad Hoc Editing’ in the Chart Properties dialog box.