graph chart

2D/ 3D Stacked Horizontal Bar Graph Examples

[ Bar Graph Home ] [ Tutorials ] [ Documentation ] [ Getting Started ] [ Solutions ]

Applet Example 4 - Data from Server Scripts

if you do not see the graph below then click here

The applet is setup here to read the configuration data from a text file and the graph data from a server side process, in this case a Java Servlet running on our web server.

The configuration data is acquired from the text file barprops.txt (click here to view)
and the graph data is acquired from the servlet SHbarDataServlet.java (click here to view).

The SHbarDataServlet ( click here to view code ) is a simple servlet designed to demonstrate how a servlet can be used to return data to either the graphing applet or servlet. As you will see the main routine ( doGet() ) uses the method GraphData() to construct the return data. Although in this example the GraphData() routine simply builds the return data from 'hard coded' values, in practice this routine would be expanded to first gather data from any number of data sources. eg. databases, files other server processes.

For a full explanation of and range of values for the above parameters please see the Documentation - Configuration Options».

« back to Examples Index

« back to Getting Started

[ Bar Graph Home ] [ Tutorials ] [ Documentation ] [ Getting Started ] [ Solutions ]

Getting Started

Documentation

Examples

Tutorials

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