SourceObject |
Identifier |
Variables |
clock |
id=getClockID() |
t |
function |
The id is returned when a function is created using an add method. id=addObject(“function”, ”var=x f=sin(x), xmin=0,
xmax=20”); id=addFunction(”x”, ”sin(x)”); |
x, y, v, a y is the value of the function at x. v and a are the first and second derivates of the function at x. |
regression |
id=getRegressionID(sid, start, end) |
m, dm, b, db m is the slope and dm is the uncertainty b is the y intercept and db is the uncertainty |
series |
id=getSeriesID(sid); |
x,y,dx,dy
|
shapes: circle, rectangle, box, etc. |
The id is returned when an object is created using an add method. id=addObject(”circle”, ”r=5”); |
x, y |
Although DataGraph is used most often as a data listener, it also contains data sources. For example, the clock data source is available since this applet inherits from the SApplet superclass. The clock is usually used to generate data at a uniform rate that is then added into a DataGraph series as demonstrated in the tutorial on page 104. Functions are data sources that send an array of data as well as a numeric derivatives to their data listeners. The length of this array is determined by the embedding width. Each DataGraph series is also a data source. This allows other data listeners to obtain the entire data set whenever data are added to a series. And finally, the geometric shapes that were designed to add annotation or emphasis to a graph are data sources.
DataGraph contains a single data listener, the graph itself. The listener id is obtained using the getGraphID method.
id=document.datagraph.getGraphID();