Doumentation on:

To put any of these charts on your page, you will need the base class Graph.class. Click here to download it.

Adding the Thermometer chart to your page

Click
here to download the Thermometer chart class

Simply add the following lines to your page:

<applet code="Thermo.class" width=100 height=250 valign=center>
<param name="Temp" value="950.5">
<param name="MaxTemp" value="1500">
<param name="MajorTick" value="500">
<param name="MinorTick" value="100">
</applet>
You can vary the applet's height if you wish, but its width is fixed.

Param TagTypeFunction
TempdoubleSets the current temperature (how high the red is).
MaxTempdoubleSets the top of the scale.
MajorTickdoubleSet how often Major Ticks are shown. Major ticks have numbers to their left.
MinorTickdoubleSets the interval between minor ticks.


Adding the Bar or Stacked Bar chart to your page

Click
here to download the Bar chart class

Simply add the following lines to your page:

<applet code="BarChart.class" width=600 height=350 valign=center>
<param name="DataURL" value="http://www.rossi.com/test/tstdata2.txt">
<param name="ColorURL" value="http://www.rossi.com/test/color.txt">
<param name="MaxY" value="400">
<param name="MinY" value="0">
<param name="YGrid" value="false">
<param name="MajorTick" value="50">
<param name="MinorTick" value="10">
<param name="Col0" value="Coffee">
<param name="Col1" value="Dougnuts">
<param name="Col2" value="Pies">
<param name="Col3" value="Cake">
<param name="Col4" value="Newspaper">
<param name="Title" value="Feb '97 Daily Sales">
<param name="Stacked" value="true">
<param name="ThreeD" value="false">
</applet>
You can vary the applet's height and width if you wish, it should scale appropriatly.

Param TagTypeFunction
DataURLStringURL to the location of the chart data, relative to the document containing the applet.
ColorURLStringURL to chart color data, relative to the document containing the applet. This is optional. If not specified, default colors are used.
MaxYdoubleSets the top of the scale.
MinYdoubleSets the bottom of the scale. This is optional, default is zero
YGridbooleanIf true, turns on Y axis grid lines.
MajorTickdoubleSet how often Major Ticks are shown. Major ticks have numbers to their left.
MinorTickdoubleSets the interval between minor ticks.
ColnStringSets the name of a column of data in the legend. Note that for the first column, n=0
TitleStringSets the chart's title. (Optional)
StackedbooleanIf set to "true", then make a stacked bar chart, if set to "false", make a regular bar chart.
ThreeDbooleanIf set to "true", then make a 3-D bar chart, if set to "false", make a 2-D bar chart.


Adding the Line chart to your page

Click
here to download the Line chart class

Simply add the following lines to your page:

<applet code="LineChart.class" width=600 height=350 valign=center>
<param name="DataURL" value="http://www.rossi.com/test/LineTest.txt">
<param name="MaxY" value="1">
<param name="MinY" value="-1">
<param name="YGrid" value="true">
<param name="MajorTick" value=".2">
<param name="MinorTick" value=".05">
<param name="Title" value="Trig functions">
<param name="Col0" value="sine">
<param name="Col1" value="cosine">
<param name="ThreeD" value="true">
<param name="LineWidth" value="3">
</applet>
You can vary the applet's height and width if you wish, it should scale appropriatly.

Param TagTypeFunction
DataURLStringURL to the location of the chart data, relative to the document containing the applet.
ColorURLStringURL to chart color data, relative to the document containing the applet. This is optional. If not specified, default colors are used.
MaxYdoubleSets the top of the scale.
MinYdoubleSets the bottom of the scale. This is optional, default is zero
YGridbooleanIf true, turns on Y axis grid lines.
MajorTickdoubleSet how often Major Ticks are shown. Major ticks have numbers to their left.
MinorTickdoubleSets the interval between minor ticks.
ColnStringSets the name of a column of data in the legend. Note that for the first column, n=0
TitleStringSets the chart's title. (Optional)
ThreeDbooleanIf set to "true", then make a 3-D line chart, if set to "false", make a 2-D line chart.
LineWidthintSets the line width in 2-D mode
Note: MaxY, MajorTick, MinorTick are floating point numbers.


Adding the XY chart to your page

Click
here to download the XY chart class

Simply add the following lines to your page:

<applet code="LineChart.class" width=600 height=350 valign=center>
<param name="DataURL" value="http://www.rossi.com/test/LineTest.txt">
<param name="MaxY" value="1">
<param name="MinY" value="-1">
<param name="YGrid" value="true">
<param name="MajorTick" value=".2">
<param name="MinorTick" value=".05">
<param name="MaxX" value="1">
<param name="MinX" value="-1">
<param name="XGrid" value="true">
<param name="MajorXTick" value=".2">
<param name="MinorXTick" value=".05">
<param name="Title" value="Trig functions">
<param name="Col0" value="sine">
<param name="Col1" value="cosine">
<param name="ThreeD" value="true">
<param name="LineWidth" value="3">
</applet>
You can vary the applet's height and width if you wish, it should scale appropriatly.

Param TagTypeFunction
DataURLStringURL to the location of the chart data, relative to the document containing the applet.
ColorURLStringURL to chart color data, relative to the document containing the applet. This is optional. If not specified, default colors are used.
MaxYdoubleSets the top of the scale on the Y axis.
MinYdoubleSets the bottom of the scale on the Y axis. This is optional, default is zero
YGridbooleanIf true, turns on Y axis grid lines.
MajorTickdoubleSet how often Major Ticks are shown on the Y axis. Major ticks have numbers to their left.
MinorTickdoubleSets the interval between minor ticks on the Y axis.
MaxXdoubleSets the maximum of the scale on the X axis.
MinXdoubleSets the minimum of the scale on the X axis. This is optional, default is zero
XGridbooleanIf true, turns on X axis grid lines.
MajorXTickdoubleSet how often Major Ticks are shown on the X axis. Major ticks have numbers to their left.
MinorXTickdoubleSets the interval between minor ticks on the X axis.
ColnStringSets the name of a column of data in the legend. Note that for the first column, n=0
TitleStringSets the chart's title. (Optional)
ThreeDbooleanIf set to "true", then make a 3-D line chart, if set to "false", make a 2-D line chart.
LineWidthintSets the line width in 2-D mode
Note: MaxY, MajorTick, MinorTick are floating point numbers.


Format of Chart Data stored in DataURL

Example:
"Mon",12,20,60,57,94
"Tue",33,49,2,73,88
"Wed",92,46,44,62,38
"Thu",50,37,60,46,73
"Fri",80,23,60,31,59
Each line of data represents a "Row". Each Row contains a "Row Name", and a series of points delimited by commas. It is important that each Row contains the same number of data points, and that each have a name. The data points are positive floating point numbers.

The Row Names are printed on the X-axis. If there are a lot of rows, their names my overlap when drawn. While you cannot omit row names from the file, you may replace some of them with the null string (""). In this way, you can make it appear that every nth row is named.