GShape.setFillColor(color)

Sets the fill color for a GShape object. The corresponding “getter” function is getFillColor().

Parameters

color

java.awt.Color to fill the shape

Example

Chart Component Script
dataset = [["State","Quantity"], ["NJ",200], ["NY",300]]; (1)
graph = new EGraph();
var elem = new PointElement("State","Quantity");
var circle = GShape.CIRCLE.create(true, true); (2)
circle.setFillColor(java.awt.Color.RED); (3)
var shapeFrame = new StaticShapeFrame(circle); (4)
var sizeFrame = new StaticSizeFrame(10);
elem.setSizeFrame(sizeFrame);
elem.setShapeFrame(shapeFrame); (5)
graph.addElement(elem);
1 See dataset to use a data block instead of an array literal.
2 Use create() to create the shape.
3 Use setFillColor() to assign the color.
4 Pass the shape to the StaticShapeFrame constructor.
5 Use GraphElement.setShapeFrame(frame) to add the ShapeFrame to the IntervalElement.

GShapeImageShape4

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.