MultiGraph: Multi-Purpose Interactive Scientific Graphics for Java | ||
---|---|---|
Prev | Chapter 4. MultiGraphlet Configuration and Usage | Next |
When you have prepared your station server, graph specification (or graph server), and data server, you are ready to create an HTML page that invokes MultiGraphlet in a web page. To do that, put a copy of the file "multigraph.jar" in a directory on your web server, and in that same directory (called the "codebase" directory), create an HTML file containing an applet tag that looks like the following:
<applet code="multigraph.MultiGraphlet.class"
archive="multigraph.jar"
width="600"
height="460">
PARAMS...
</applet>
The PARAMS... above should be replaced with a list of lines like
<param name="NAME" value="VALUE">
There should a "<param...>" line for each of the following parameters. Each parameter is required unless otherwise specified.
data_url |
The URL for the data server. This can be a relative URL, a root-relative URL, or an absolute URL complete with "http://" prefix, but Java security restrictions require that it be the URL of a data server on the same server where MultiGraphlet resides. The URL given here should not include any arguments; MultiGraphlet constructs data server request URLs by appending arguments to the URL you give here, beginning with the "?" character. |
station_url |
The URL for the station server. This can be a relative URL, a root-relative URL, or an absolute URL complete with "http://" prefix, but Java security restrictions require that it be the URL of a data server on the same server where MultiGraphlet resides. The URL given here may include arguments, or it may be the URL of a static file, if your list of stations is fixed. The "station_url" parameter is optional; leave it out if you don't have a station server. In that case, you must specify a "station_name" parameter instead. |
station_name |
This parameter should be present if and only if the "station_url" parameter is not present. It gives the name of the single station to display data from. |
station_id |
The station id of the station to display data from intially. The user can change this with the station drop-down box (unless you have omitted the "station_url" parameter, in which case there is no station drop-down box.) |
graph_url |
The URL of an XML file giving your graph specification, or the URL of a graph server program that runs on same server as MultiGraphlet. |
config |
This parameter is required only if the URL given by "graph_url" points to a graph server program. In that case, the "config" parameter should give the name of the graph specification that you want this instance of MultiGraphlet to use. |
timezone |
The time zone to use initially in labeling the time axis; should be one of the time zone names given in Appendix B. |
last |
The hour of the last observation to display initially, in the format YYYYMMDDHH. This parameter is optional. If not present, it defaults to the current hour. |
first |
The hour of the first observation to display initially, in the format YYYYMMDDHH. This parameter may only be specified if "last" is also specified, and it is optional. If not present, it defaults to the hour 24 hours prior to the value given for "last", or to the hour 24 hours prior to the current hour, if no value is given for "last". |
The "width" and "height" attributes inside the "<applet...>" tag give the width and height, in pixels, for MultiGraphlet's drawing area in the browser. MultiGraphlet's layout has been optimized for width="600" and height="460", but you can experiment with other settings, which may or may not work very well.