In
the applet form of the graph, any data item can be linked
to a JavaScript function within the current page via
the URL and target elements.
To
instruct the graph applet to execute a JavaScript function
( rather than URL ) upon a mouse click the target element
of the data item must be set to a value of "javascript".
The function to be executed should then be entered in the URL element of the
data item. For example let's suppose we have a JavaScript function named "combo()" that we wish to operate upon the
click of data item 1. The data definition would then look like this:-
data1series1: 10320,combo(),javascript
In
addition it is vital that "mayscript"
is present in the applet tag e.g,
<applet
code="PiechartApplet.class" archive="Piechart.jar"
width="500" height="420" mayscript>
For
an example of the graph applet executing a JavaScript
function please click
here.
|