Rect25Coord
The Rect25Coord object is the same as the RectCoord object, but creates a 3D effect for elements. To create a Rect25Coord object, call the object constructor:
var rect = new Rect25Coord(xscale,yscale);
You can pass a set of Scale objects (e.g., ‘xscale’, ‘yscale’, etc.) to the constructor, or specify these later using the inherited RectCoord.setXScale(scale) and RectCoord.setYScale(scale) properties.
Example
Chart Component Script
dataset = [["State", "Quantity"], ["NJ", 200], ["NY", 300]]; (1)
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var sscale = new CategoricalScale("State"); (2)
var qscale = new LinearScale("Quantity"); (2)
var coord = new Rect25Coord(sscale,qscale); (3)
graph.setCoordinate(coord); (4)
graph.addElement(elem);
| 1 | See dataset to use a data block instead of an array literal. |
| 2 | Create the Scale objects. |
| 3 | Create the Rect25Coord object from the Scale objects. |
| 4 | Use EGraph.setCoordinate(coord) to add the RectCoord to the Chart. |

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.
|