graph chart

Advanced Pie Chart

2D / 3D Pie Chart, version 3.2
by Sirius Computer Consultants Limited

 

Applet - Servlet Combination

One of the factors to consider when deciding between implementing the applet or servlet form of the graph is that, browsers in general do not print applets very well and the results can vary between browser makes and versions. The servlet however returns the graph image to the browser in GIF format and as such will print consistently without any problems across all browser makes and versions.

Another factor to consider when deciding to implement the applet or servlet is whether the interactive features of the applet are required (mouseover pop-ups and mouseclick URL functionality). In the servlet form, the graph is returned to the browser as a GIF image and as such the interactive features of the applet are not available.

This example demonstrates how to implement the applet and servlet together so that all the interactive features of the applet are presented to the user and also giving the user the option of printing the page containing the graph.

On this first page we implement the applet ( which acquires both the configuration and graph data from data files). Clicking on the note at the foot of the graph will bring up an almost identical page which contains the servlet implementation which is universally printable.


( for a printable version of this page please click here )

 

The configuration data is acquired from the text file pieprops.txt (click here to view)
and the graph data is acquired from the text file piedata.txt (click here to view).

and here is the HTML code,

<applet code="PiechartApplet.class" width="600" height="420" archive="Piechart.jar">

<!-- Data files -->
<PARAM name="chartdata" value="piedata.txt">
<PARAM name="chartproperties" value="pieprops.txt">

<!-- Start Up Parameters -->
<PARAM name="LOADINGMESSAGE" value="Pie Chart Loading - Please Wait.">
<PARAM name="STEXTCOLOR" value="0,0,100"> <!-- Message Text Color-->
<PARAM name="STARTUPCOLOR" value="200,225,255"> <!-- Applet Background color -->

</applet>

 

Examples

Contents

Introduction

Applet Examples
Servlet Examples
Applet - Servlet Combination

Licensing and Purchasing Options

Documentation

Further Information and Support

More Graph and Chart Functions