bar graph

3D Pie Chart - Tutorials

[ Pie Chart Home ] [ Getting Started ] [ Documentation ] [ Examples & Demo's ] [ Solutions ]

Quick Start Tutorials - Script Interface (via PHP, ASP, JSP or Servlet)

This method provides the ability to add Real-Time Dynamic Database Graphing to your web pages. This method is extremely powerful and allows the construction of graphs from virtually any database / database system running on virtually any platform.

Method Outline
Here the graph applet is incorporated into a a static HTML page but rather than supplying the data with PARAM tags or flat file, the graph is set to acquire data from a server side script. The server side script accesses the databases and returns the graph data to the applet.
At page view time the script reads data from the database and formats the data for input into the either the graphing Applet or Servlet - hence producing a Real-Time Dynamic Graph with data direct from a database within the web page.

Note: This method may be applied to both Applet and Servlet forms of the graphing software.

Implementation
To implement this method simply perform the following 3 steps,

  1. Construct the Data Script
  2. Construct the HTML Page
  3. Upload the Script, HTML page and jar file to your web server

 

Step 1 - Construct the Data Script
The dynamic script can be constructed in any language of your choice. Most Web Servers these days come set up with a dynamic scripting language which is configured to access your database system. For convenience we recommend using the language already configured on your web server.

(if you haven't used or are unsure about what's already available on your web server then you should in the first instance speak to your Web Server Administrator or ISP Hosting company ).

The following are the most common Scripting languages and cover over 90% of web servers in use today,

  • PHP
  • ASP
  • JSP
  • Java Servlet

In the "./TemplateScripts" directory you will find template scripts which are designed to provide a base from which to tailor a script for your implementation. You are free to copy, modify and utilize these scripts in any manor you wish.

Simply pick, from the links below, the template script for your environment, modify where indicated and upload to your web server.

PHP template script - ./TemplateScripts/PHP/PieData.php

ASP template script - ./TemplateScripts/ASP/PieData.asp

JSP template script - ./TemplateScripts/JSP/PieData.jsp

Java Servlet - ./TemplateScripts/Servlet/PieData.java

When modifying the applet configuration parameters within these scripts please also refer to the following section in the Documentation,

Documentation - Pie Chart Configuration Options

 

 

^^ back to top

 

Step 2 - Construct the HTML Page

In your web page place the following code, where you wish the graph to appear,

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


</applet>

Adjusting the "width" and "height" element of this applet tag to specify the size (in pixels) of the desired graph display.

Using this option the applet will read all the configuration information from the standard applet <PARAM> tags. Simply add the <PARAM> tags, contained in the paramtags.txt file (click here), to your html between the <APPLET> and </APPLET> tag, adjusting the values to specify the characteristics of the pie graph.

For a full description of each property please see the following section in the Documentation,
"Configuration Options and Parameters".

 

^^ back to top

 

 

Step 3- Upload the Script, HTML Page and jar file to your web server.
The final step is to simply upload the HTML Page and Data Script to your web server and place the
Piechart.jar file in the same directory as your web page. At only 14kb this jar file contains all the applet code for producing the graph in your page and as such is very fast to load and run.

^^ back to top

 

 

If you experience any difficulties implementing then please do not hesitate to contact us at,
support@jpowered.com

 

 

 

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 Tutorial Index

<< back to Getting Started

[ Pie Chart Home ] [ Getting Started ] [ Documentation ] [ Examples & Demo's ] [ Solutions ]

Getting Started

Tutorials

Documentation

Examples

Common Problems

Purchase

Pie Chart Home