graph demo

Graphs and Charts Applet Tutorial

graph demo[ Home ] [ Products ] [ Downloads ] [ Purchase ]
[ Support ] [ About Us ]

Supplying Graph Data to the Line Graph Applet via a Data File

Prerequisites
Graphs and Charts Package - For this tutorial you will need the Advanced Graph and Chart package. If you haven't already done so then you should first download the software here.
Overview
This method adds the graphing applet to a web page with the data supplied via an external Data File. When a visitor views the page the graph will load the data from the external file and dynamically produce the graph image.
Method
The graph is added to the page with standard HTML <APPLET> and <PARAM> tags.
Step 1 - Add the applet HTML code to your web page
Copy & Past the following HTML into your Web Page,
Adjust the "width" and "height" element of the applet tag to specify the size (in pixels) of the desired graph display.
Step 2 - Set up the Configuration data.
The applet will read all the configuration parameters from a specified file. To use this option add the following PARAM tag to your HTML code between the <applet> and </applet> tags,


Next create a text file "lineprops.txt" and add the following content to this file:-


Adjust the values to create the line graph style you require.

For a full description of each property please see the following section in the Documentation,
"Line Graph Parameter Reference"

Step 3 - Create the Line Graph data file
The applet will read all the data from a specified file. To use this option add the following PARAM tag to your HTML code between the <applet> and </applet> tags,


Next create a text file "linedata.txt" and add the following content to this file:-


Any number of data points and series of data may be added. The above example will generate three lines on the graph each with 6 data points.
For the full explanation of the dataNseriesM parameter please see:-
Graph Data Definitions

Step 4 - Upload the jar and data files to your web server.
The final step is to place the "Linegraph.jar", "linedata.txt" and "lineprops.txt" files in the same directory as your web page. A copy of the Linegraph.jar file may be found in the ./AppletFiles/ directory of the downloaded package.

The Graphs and Charts Package can be downloaded here

The jar file contains the compiled Java code (software) which produces the graph image at page view time.

Further Help and Support
If it any stage you require help, advice or simply have a general enquiry then please feel free to contact us.

Contact Support here
Related Information
Documentation
Demos and Examples
Custom Solutions Center
If would like us to perform the set-up process, create custom built data scripts or help with any other part of your web application then we are pleased to offer you the following services:-
JavaScript CSS Image Gallery