Graph IDE ► Programming ► Trajectory
The following is a complete script for programming a Trajectory graphic. It computes a somewhat circular distribution of points and also assigns a bubble value. For this to work, the trajectory graphic must have been made with a point tag marker.
|
The general API is define in the section Graphic. The following is API description specific to the Trajectory graphic.
@@method(public, instance) (void)appendXValue:(double)xValue yValue:(double)yValue;
| |
Call like this:
Appends the x and y values to the list of data points for the graphic. The x and y values forms a 2D point. Each value must be of type double. | |
@@method(public, instance) (void)appendMarkerRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha;
| |
Call like this:
That appends the marker color to the red, green, blue and alpha values of 0.5, 0.4, 1.0 and 1.0 respectively. Those values must be between 0.0 and 1.0. An alpha of 0.0 is transparent while 1.0 is completely opaque. Each argument must be a number literal or a variable (or expression) of type double. Note that this call must accompany a appendXValue:xValue yValue: call in order to synchronize the parameters that depend upon sequence index. | |
@@method(public, instance) (void)appendSegmentRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha;
| |
Call like this:
That appends the segment color to the red, green, blue and alpha values of 0.5, 0.4, 1.0 and 1.0 respectively. Those values must be between 0.0 and 1.0. An alpha of 0.0 is transparent while 1.0 is completely opaque. Each argument must be a number literal or a variable (or expression) of type double. Note that this call must accompany a appendXValue:xValue yValue: call in order to synchronize the parameters that depend upon sequence index. | |
@@method(public, instance) (void)appendBubbleValue:(double)aValue;
| |
Call like this:
Appends aValue to the list of bubble values for the graphic. aValue must be of type double. | |
@@method(public, instance) (void)emptyData;
| |
Call like this:
Removes (empties) all data from the graphic. Call this right before adding new data points. |