bar graph

2D / 3D Horizontal Bar Graph Documentation

[ Bar Graph Home ] [ Tutorials ] [ Getting Started ] [ Examples & Demos ] [ Solutions ]

Connecting the Graph to a Server Process

Both applet and servlet may be set to acquire the configuration and graph data from a server side process/script. This is done by simply entering the URL of the server side process into the parameters of the bar graph. This method gives the bar graph enormous flexibility in terms of data acquisition and in the next section you will see how to use this method to retrieve data from a database.

Creating the Server Side Process
The server side process can be created in any language of your choice and the only criteria is that the output must follow the format of the data files (see Retrieving Graph Data from files). To help you create your own server side scripts we have created some template scripts in the ServerTemplateScripts directory. We recommend using these scripts as a starting point for your own.

Configuring the Applet to use Server Side Scripts.
To set the applet to acquire data from a server process simply, add the following parameters to your html, between the <applet> and </applet> tags.

<PARAM name="chartproperties" value="[URL of Server Process]">
<PARAM name="chartdata" value="[URL of Server Process]"

replacing [URL of Server Process] with the URL of your server process.
For example if we have two java servlets (configServlet and DataServlet) which create the config properties and supply the graph data at URLs,

http://www.yourdomain.com/servlet/configServlet
http://www.yourdomain.com/servlet/DataServlet

then the html parameters would be,

<PARAM name="chartproperties" value="http://www.yourdomain.com/servlet/configServlet">
<PARAM name="chartdata" value="http://www.yourdomain.com/servlet/DataServlet"


For example server scripts (in ASP, PHP, JSP and Servlet) please see the
Script Interface section or click here.


Configuring the Servlet to use Server Side Scripts.
To set the servlet to acquire data from a server process, simply insert the URLs of the server processes into the <IMG> tag in your html page.

<img src="[ServletEngineURL]/HbarchartServlet?
config=[URLconfigFile]&
data=[URLdataFile]" width="500" height="420">

replacing [URLconfigfile] and [URLdataFile] with the URLs of your server processes. For example if we have two java servlets (configServlet and DataServlet) which create the config properties and supply the graph data at URLs,

http://www.yourdomain.com/servlet/configServlet
http://www.yourdomain.com/servlet/DataServlet

then the html <IMG> tag would be,

<img src="http://www.yourdomain.com/servlet/HbarchartServlet?
config=http://www.yourdomain.com/servlet/configServlet&
data=http://www.yourdomain.com/servlet/DataServlet"
width="500" height="300">


For example server scripts (in ASP, PHP, JSP and Servlet) please see the
Script Interface section or click here.


The Graphing Software provides several methods by which data can be acquired from databases. For a full discussion on the various methods and Template Scripts please see the Tutorial Section.

« back to Documentation Index

« back to Getting Started

[ Bar Graph Home ] [ Tutorials ] [ Getting Started ] [ Examples & Demos ] [ Solutions ]

Getting Started

Documentation

Examples

Tutorials

Common Problems
This section describes and provides solutions to common problems.