Using the Java Programming Language · Compiling a Program
Distributing JClass Chart Applications
JClass Chart offers users a choice of interaction techniques that simply aren't available in other components. In all, there are four different ways of interacting with JClass Chart:
JClass Chart is available as either a JDK 1.0.2 Transitional Bean or a JDK 1.1 Java Bean. The API and event handling is identical for both versions, eliminating the need to re-code your Java programs.
JClass Chart is remarkably flexible. Shown below are just some of the unique things that can be done with JClass Chart:
The chart types supported by this release of JClass Chart are shown below:
Chart Type | Description |
---|---|
Plot | Linear graph of data as connected points. |
Scatter Plot | Same as Plot, but the data points are not connected by lines. |
Bar | Each data set value at each point is plotted as a bar of a particular color. If the 3D property is set, the bars are rendered to give them a 3D appearance, and the chart can be rotated. |
Stacking Bar | Similar to a bar chart, only the data set bars are stacked on top of each other. |
Pie | A total is determined for each point across data sets, and each data set is shown as a slice of a pie expressing its percentage of the "total". An "other" slice is used to show data sets that are too small to appear. As with bar charts, pie charts can take on a 3D appearance. |
Each of these chart types can be controlled and modified in a number of ways. Each data series has a chart "style" associated with it that controls the appearance of the data series, including the fill color for bar charts, the point style for plot charts, and so on. Bar, stacking bar and pie charts all have three-dimensional attributes that can be used to give depth and perspective to the chart.
JClass Chart supports external data sources. This means that an existing data object can be attached to JClass Chart. The data object can be loosely-coupled or tightly-coupled to JClass Chart. In the loosely-coupled case, the data is retrieved from the data source when the data source is attached. If desired, the chart can update the data source when values are changed. In the tightly-coupled case, the data source can inform chart when data has changed.
The jcchart[xxx]-classes.zip file can be located anywhere on a user's computer or on a Local Area Network (LAN), but you must indicate to the Java interpreter where it can find the Java classes it contains. This is done by setting the CLASSPATH environment variable. The CLASSPATH environment variable consists of the names of directories containing compiled Java classes. The following examples will help you set CLASSPATH properly on your system.
If you are using JClass Chart in a development environment, do not unarchive the contents of the jcchart[xxx]-classes.zip file--its contents are automatically read by Java.
If your CLASSPATH environment variable is not set up correctly, see your system administrator or the "Update environment variables" section specific to your computing platform. This information can be found through the Java Developers Kit Web page at http://www.javasoft.com/products/jdk/.
Before attempting to use JClass Chart, you must be able to compile Java applications or applets. Make sure you can compile and run simple Java applications or applets before you begin to use JClass JClass Chart. Consult the Java JDK documentation for assistance in determining the location of the Java compiler (javac) and the Java class files.
The following are descriptions for configuring CLASSPATH for specific operating systems:
set CLASSPATH={references to other programs};C:\foo\jcchart[xxx]-classes.zip
If a CLASSPATH statement exists, select it. In the Value field, add the following to the existing statement:
C:\foo\jcchart[xxx]-classes.zipIf no CLASSPATH statement exists, in the Variable field, type:
CLASSPATHand in the Value field, type:
C:\foo\jcchart[xxx]-classes.zip
Tip: If you are going to compile Java programs in the same directory that contains Java .class files, add a period to the CLASSPATH statement to point the Java compiler to look for .class files in the current directory, as in the following example:
C:\foo\jcchart[xxx]-classes.zip;.This method will work on all computing platforms.
Note to Browser Users: If you set the CLASSPATH for your entire session, the CLASSPATH will be picked up by the Web browser as well.
If the Java compiler and class files are installed in the standard places (typically \JDK1.1.1\bin\) can be compiled by entering the following at a prompt:
javac foo.java
For more information, read the License Agreement at the beginning of this manual for complete details.