The Applet form of the Graph has several methods exposed
which enable the properties and data of the graph to be updated
dynamically from other page objects.
So that the Graph may be referenced from other page objects
it must first be named. This is done by adding the 'name'
parameter to the <applet> tag. i.e,
Set a Data Value
set_datavalue(int
datanum, int series, String value, boolean re_paint)
This method enables any of the graph data values to be
changed.
datanum - this is the data number with the series.
eg. 3 would represent the 3rd data value of the series.
series - the series number. eg. 1 would be represent
the 1st series of data.
value - the value to which this data item should
be set.
re-paint - specifies whether the graph should
be re-drawn once the data value is set. Value can be either
"true" or "false"
e.g. to add a button to your web page which will update
the second data value of series 1,
<input type="button"
value="Update Data Item" onclick="document.applets['GRAPH'].set_datavalue(2,1,"52.4",
true);">
^back to top
Reload Data
reload_data(String
value, boolean re_paint)
This method enables all the graph data to be reloaded from
a file or server side process. This method is particularly
useful where you wish the chart data to be refreshed either
by a user action or time interval.
value - the URL specifyig the location of the
data file or server side process supplying the data
re-paint - specifies whether the graph should
be re-drawn once the data is loaded. Values may be either
"true" or "false".
^back to top
Set a Parameter (graph property)
set_parameter(String
parmname, String value, boolean re_paint)
This method enables any of the Graph Parameters to be modified
dynamically during runtime.
parmname - this is the property name as defined
in the Parameters section.
value - the value which this property should be
set.
re-paint - specifies whether the graph should
be re-drawn once the parameter is set. Value can be either
"true" or "false"
e.g. to add a button to your web page which will turn the
3D effect off,
<input type="button"
value="3D Off" onclick="document.applets['GRAPH'].set_param('3D',
'false', true);">
^back to top