graph chart

Stacked Vertical Bar Graph Examples

Servlet Example 2

The servlet is setup here to read the configuration data from a text file and the graph data from a server side process, SHbarDataServlet.

Please Note: In order for the Graphing Servlet to produce the image below, a Servlet Runner must be running on your local machine - see beginning of this section.

 

and here is the HTML code,

<img src="http://localhost:8080/servlet/SVbarchartServlet?
config=http://www.jpowered.com/bar_graph/svbargraph/Examples/barprops.txt&
data=http://localhost:8080/servlet/SVbarDataServlet"
width="450" height="440">

The SVbarDataServlet ( 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 datasources. eg. databases, files other server processes.

There are various methods by which the graphing servlet can be set to acquire data from databases including:-

Direct Database Binding
Database Script Interface

For a full dicussion on the varius methods and example scripts please see the
Tutorial section - click here.

 

Note: If you are using the evaluation version then in the applet a pop-up window will appear upon the startup and an evaluation message will be incorporated by the servlet. Both these features have been removed from the licensed version. Licensing information can be found at http://www.jpowered.com/graph_chart/index.htm

 

 

<< back to Examples Index

<< back to Getting Started

Getting Started

Documentation

Examples

Tutorials

Common Problems

Purchase

Bar Graph Home

 

Graph & Charting

Pie Chart
Line Graph
Stacked Vertical Bar Graph
Stacked Bar Graph
Horizontal Bar Graph
more...

 

Advanced Data Grid Control