| |
|
Product X |
| January |
$
3,162 |
| February |
$
2,516 |
| March |
$
2,945 |
| April |
$
3,980 |
| May |
$
5,750 |
| June |
$
6,230 |
| July |
$
4,765 |
| August |
$
5,636 |
| September |
$
5,120 |
| October |
$
4,365 |
| November |
$
5,789 |
| December |
$
5,623 |
|
|
Product Y |
| January |
$
6,840 |
| February |
$
6,704 |
| March |
$
3,945 |
| April |
$
6,780 |
| May |
$
4,750 |
| June |
$
2,230 |
| July |
$
1,065 |
| August |
$
636 |
| September |
$
520 |
| October |
$
250 |
|
|
Product Z |
| April |
$
253 |
| May |
$
682 |
| June |
$
989 |
| July |
$
1,920 |
| August |
$
1,240 |
| September |
$
2,240 |
| October |
$
1,450 |
| November |
$
2,808 |
| December |
$
2,050 |
|
and
here is the HTML code for the applet ( note that 'mayscript'
has been added to the APPLET tag ),
<APPLET
CODE="LineGraphApplet.class" ARCHIVE="LineGraph.jar"
WIDTH="443" HEIGHT="420" mayscript>
<!--
Start Up Parameters -->
<PARAM NAME="LOADINGMESSAGE" VALUE="Line
Graph Loading - Please Wait.">
<PARAM NAME="STEXTCOLOR" VALUE="0,0,100">
<!-- Message Text Color-->
<PARAM NAME="STARTUPCOLOR" VALUE="255,255,255">
<!-- Applet Background color -->
<!--
Data files -->
<PARAM NAME="chartproperties" VALUE="linepropsjs.txt">
<PARAM NAME="chartdata" VALUE="linedatajs.txt">
</APPLET>
The
configuration parameters are taken from the text file
linepropsjs.txt ( click here
to view )
and the graph data is read from the text file linedatajs.txt
( click here to view )
If
you "right click" and view source of this page
you will see that we have the following javascript function
within the page which is able to act upon the three tables,
"c1", "c2" and "c3".
<SCRIPT
LANGUAGE="JavaScript">
var
table='c1';
function combo(table) {
if (table=='c1') {
if (document.all.c1.style.visibility=="hidden")
{
document.all.c1.style.visibility="visible";
}
else {document.all.c1.style.visibility="hidden";}
}
if (table=='c2') {
if (document.all.c2.style.visibility=="hidden")
{
document.all.c2.style.visibility="visible";
}
else {document.all.c2.style.visibility="hidden";}
}
if (table=='c3') {
if (document.all.c3.style.visibility=="hidden")
{
document.all.c3.style.visibility="visible";
}
else {document.all.c3.style.visibility="hidden";}
}
}
</script>
In
the linedatajs.txt ( click here
to view ) file you will see that each of our data
elements has the word "javascript" entered in
the target field and the javascript function name with
the relevant value entered in the URL field.
For
a full explanation of and range of values for the above
parameters please see the Documentation.
Note:
If you are using the evaluation version then in the
applet a pop-up window will appear upon the startup
and an evaluation message will be incorporated by the
servlet. Both these features have been removed from
the licensed version. Licensing information can be found
at