GraphsCharts.com

About Using our Dynamic Line Graph Applet

General Usage Information

The line graph applet can be used in any server environment, including Windows, Unix and Mac operating systems. The data can be supplied to the applet by static HTML pages, or by a dynamic web application using any of the following:

- PHP
- ASP
- Java Servlets
- JSP
- ColdFusion
- Lotus Domino
- ... and many more

The applet is most powerful when used in conjunction with a database, such as:

- Microsoft SQL Server
- Microsoft Access
- Oracle
- MySQL
- PostgreSQL

Installation

To start using the line graph applet on your web site, simply follow these 2 steps:

  1. Extract the applet class file, "linegraph.class", to the same directory as the web pages you want to display line graphs on.
  2. Modify your web pages to include the correct tags for displaying the line graphs, as explained below.
HTML Tags

The line graph applet requires a simple set of HTML tags to pass in data and set some options. The applet operates in 2 "modes". In "Date" mode, the X axis relates to a date range and the following parameters should be used:

<APPLET CODE="linegraph.class" HEIGHT=180 WIDTH=400>
(You can alter the height and width to whatever you want)

<PARAM NAME=mode VALUE="0">
(Specifies that "Date Mode" is to be used)

<PARAM NAME=title VALUE="Sales">
(Supply a title for the graph)

<PARAM NAME=ymax VALUE=30>
(Use to specify the upper limit for your graph)

<PARAM NAME=ymin VALUE=10>
(Use to specify the lower limit for your graph - defaults to zero)

<PARAM NAME=LabOffset VALUE=10>
(The number of pixels to the left of their ticks which the 'x' axis labels begin at. Increase for long lables.)

<PARAM NAME=NumberOfLabs VALUE=5>
(Number of 'x' axis labels.)

<PARAM NAME=Grid VALUE=true>
(Show grid. Enter "false" to hide the grid)

<PARAM NAME=Lab1 VALUE="Jan-99">
<PARAM NAME=Lab2 VALUE="Apr-99">
<PARAM NAME=Lab3 VALUE="Jul-99">...etc.
(These parameters specify the 'x' axis labels you want displayed on your graph. There should be as many labels as are specified in the "NumberOfLabs" parameter.)

<PARAM NAME=LineColor_R VALUE=255>
<PARAM NAME=LineColor_G VALUE=0>
<PARAM NAME=LineColor_B VALUE=0>
(These 3 parameters specify the Red-Green-Blue values for the color of the graphing line to be drawn. Use values between 0 and 255.)

<PARAM NAME=NumberOfVals VALUE=30>
(You can alter the value to whatever you want - this determines how many points will be shown on the graph)

<PARAM NAME=Val1 VALUE="29.1">
<PARAM NAME=Val2 VALUE="12.5">
<PARAM NAME=Val3 VALUE="10.3">...etc.
(These parameters specify the values you want displayed on your graph. There should be as many values as are specified in the "NumberOfVals" parameter.)

</APPLET>

In "Number Mode", the X axis represents numerical data, and each point on the graph is assigned an X and a Y value:

<applet code="linegraph.class" height=320 width=420>
   <param name=title value="Price (k$) / Demand">
   <param name=NumberOfVals value=9>
   <param name=xmax value=70000>
   <param name=xmin value=0>
   <param name=ymax value=5000>
   <param name=ymin value=0>
   <param name=mode value=1>
   <param name=LineColor_R value=51>
   <param name=LineColor_G value=153>
   <param name=LineColor_B value=51>
   <param name=Grid value="false">
   <param name=VAL1 value="800:5000">
   <param name=VAL2 value="1600:4000">
   <param name=VAL3 value="4000:3000">
   ...etc.
</applet>

Purchasing

You can purchase as version of this applet without the "GraphsCharts.com" credit. More details.