[Index] [Introduction] [Installation] [Cookbook] [Package] [Chart] [Axis] [Utility] [Applet] [Servlet] [Appndx A] [Appndx B] [API]

FRAMES  NO FRAMES  NO FRAMES INDEX


Chart Components

Chart Components can be combined in various forms to create a complete chart. This section describes some of the most common chart components and their properties.


Bar

Bars include the Bar class, and wide range of subclasses, including StackColumn, StackBar, HorizBar, HiLoBar, HorizHiLoBar, Stick, and HiLoClose.

All Bars share properties and drawing methods common to the Bar superclass. Bars generally have 2-D or 3-D effects, and may or may not have visible labels. Other significant properties of Bars include:


Line

Lines include the Line class and the Regress class, which draws a regression line for each of its Dataset classes. Lines draw as a 3-D tape line, or as a single line. Linewidths and linestyles are currently not supported in Java.

Line properties include:

Regress DiscontinuousLine

Pie

A Pie draws a pie chart style representation of a single Dataset. Pies can be 2-D or 3-D and each slice can be exploded for effect. Other properties include:


Area

An Area component stacks values to draw one area above another. X values are assumed to be monotonically increasing, and uniform across datasets. Areas can use 2-D or 3-D drawing effects. Areas do not draw markers or labels.


Axis

Axes draw a scale to give perspective to the data components. Axis classses are also able to evaluate arrays of datasets and create reasonable increments and starting and ending values. Since grid lines, tick marks, and labels are associated with a particular axis, these are managed by the Axis class. The Axis starting and ending values are also used to create a Transform class, owned by a specified data representation component (Line, Bar, etc.), which is used to transform the data in that particular component.

Axes can be vertical or horizontal, and can use scaling behavior for lines (assesses both high and low data values) or bars (defaults to start bar axes at 0, but also considers a Bar's baseline, and descending data values).

Axis's extensive list of properties includes:

HiLoAxis evaluates Y2 Datum values to create automatic scales and increments.

StackAxis evalutes the sum of Y values at each datapoint to create automatic scales and increments.

LabelAxis overrides the default labelling methods of Axis to draw user defined labels. If a user-defined label is unavailable for a particular increment, LabelAxis uses a Datum value or Datum label from the Axis' first Dataset.

LabelAxis adds a labelStrings property, which permits you to manipulate the axis labels independent of the actual Axis values.

DateAxis evaluates the Dataset values as Date information (X or Y values represent the number of milliseconds since Java's epoch). This Axis subclass also overrides labeling, and tick and grid placement to use potentially irregular date/time values.

DateAxis adds a number of properties that are specific to Dates and Time values. This axis also adds a couple of important methods (dayString and monthString) that permit customizations for non-english speaking locales.

SpeedoAxis includes a number of properties to determine the size and position of the curved gauge axis. SpeedoAxis evaluate an entire array of Dataset values, even though the Speedo class plots a single value.


Background

A chart Background is a colored rectangle drawn beneath an entire chart. The Background also includes an overall chart title.

Properties include:


Plotarea

A Plotarea is the region beneath a chart's data components. It can be drawn as a 2-D rectangle, or with 3-D effects. An Axis contains a Plotarea to determine the drawing location of the Axis.

A Plotarea's properties include its corners, which determine the location and size of a particular plot, as well as its axes.


Legend

Legends are used as a key to describe a specified array of Datasets. Preconstructed Chart subclasses always use all the chart's Datasets for Legend construction, but this is not a requirement.

Legend properties include the position, background color and label font, as well as the width, and height of legend icons. Another property, iconGap, lets you adjust the space between legend entries. Legends may also be drawn horizontally or vertically.

Default legends draw rectangular icons in the same color as each of the Legend's Datasets. The Legend's labels are the Dataset names.

LineLegend draws a line and image marker (if defined) for each Dataset instead of a colored rectangle.

PieLegend draws a rectangle for each Datum in a specified Dataset. This is the first Dataset in the Legend's array of Datasets.


Speedo

A Speedo is a special case chart that draws a single value from a single dataset in a form that looks like a conventional analog gauge. Speedos require a SpeedoAxis to determine the size and position of the data representation.

Speedo's most important property is needleStyle, which determines whether the data will be represented as a needle, an arrow, a pointer or an arc.

Other attributes are taken from the Speedo's axis, which determines size, location and direction. In general, Speedos can be drawn as full, half, or quarter circles, in any permutation. See SpeedoAxis documentation for more information.


Dataset

A Dataset class is a collection of Datum classes that also defines a name and Gc property. A single Pie is one dataset, as is a group of same-colored bars or a single plot line.

Because Datasets are an important part of any coherent chart, every Chart subclass includes a number of methods for adding and modifying the Chart's Datasets in a uniform way.


Datum

Datum is a single numeric observation, and may contain a label, a Gc, and several concurrent numerical values. One Datum is displayed in each Pie slice, each Bar segment, each vertex on a line, etc.

Datum has a wide range of constructors to correspond to many kinds of data.


[Index] [Introduction] [Installation] [Cookbook] [Package] [Chart] [Axis] [Utility] [Applet] [Servlet] [Appndx A] [Appndx B] [API]