PieShapeFrame

The PieShapeFrame object contains the shape styles for multi-dimensional “mini-pie” elements to be used together with a Point Chart (PointElement) chart. To create a PieShapeFrame object, call the PieShapeFrame constructor.

var frame = new PieShapeFrame("m1","m2","m3");

You can pass the name of a field (e.g., e.g., ‘m1’, ‘m2’, ‘m3’) to the constructor, or specify this later using the inherited MultiShapeFrame.setFields(arr) property. The dimension values are mapped proportionately to the areas of the pie slices.

Example

Chart Component Script
dataset = [["State", "Quantity","m1","m2","m3"], ["NJ", 200,5,2,3], ["NY", 300,2,4,4]]; (1)
graph = new EGraph();
var frame = new PieShapeFrame(); (2)
var elem = new PointElement("State", "Quantity");
var sframe = new StaticSizeFrame(15);
frame.setFields(["m1","m2","m3"]); (3)
elem.setShapeFrame(frame); (4)
elem.setSizeFrame(sframe);
graph.addElement(elem);
1 See dataset to use a data block instead of an array literal.
2 Create the PieShapeFrame object.
3 Use the inherited MultiShapeFrame.setFields(arr) property to assign the fields to the PieShapeFrame.
4 Use GraphElement.setShapeFrame(frame) to add the PieShapeFrame to the PointElement.

PieShapeFrame

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.