The JetChart Library is a Java class library that encompasses a wide range of functionalities aimed at data visualization and analysis, in the form of
different types of charts.
JetChart can be integrated into applets, Java applications and servlets. In the latter case, it is possible to use the image encoding functionalities
of JetChart to deliver GIF, JPEG, PNG and SVG chart images.
The available features are demonstrated by examples found in the package. See the installation instructions for a complete list
of all examples directories. There are also tutorials to guide user through the basics of using JetChart to develop chart applications, configure
the applets parameters and deliver GIF, JPEG, PNG and SVG encoded images with servlets. The tutorials can be found at the following links:
Series tooltips displayed simultaneously. By default tooltips are displayed
one at a time, taking into account the x and y coordinates of each data point. If multiple tooltips
are enabled and two or more series are simultaneously displayed, the only coordinates taken into
account are the labels coordinates, resulting in two or more tooltips displayed at the same time.
Pluggable series. Series are implemented as individual classes, making it easier to combine
different types of series in one single chart.
A vertical scale can be placed at four different positions along the left and right vertical axis.
Supports the following types of series:
Date labels can be automatically displayed informing a starting date and optionally the date increment
type(daily, weekly, monthly or yearly increment). Scale values can be manually set(minimum, maximum and increment values are
customizable). Event-driven series. When mouse cursor hovers over a data point, or a data point is clicked/dragged,
a special event containing information about the data point is dispatched to registered listeners. Series highlight. A data point color changes when mouse cursor hovers over it. Transparent and opaque annotations can be dropped onto the chart area and dragged.
An overview of the architecture of JetChart helps understand the core classes and their
major functionalities.
A chart is comprised of several entities, as series, grids, axis, linked together and displayed on a graphic context, represented by subclasses of java.awt.Panel or javax.swing.JPanel, depending upon whether an application will be developed on top of a heavyweight(AWT) or lightweight(Swing) component, respectively.
Three different types of graphic contexts are currently available, all of them subclasses of GenericGraph:Legend - Provides properties and methods of the legend box.
ToolTip - Provides tooltips properties and methods.
LeftTitle - Provides the left title properties and methods.
RightTitle - Provides the right title properties and methods.
BottomTitle - Provides the bottom title properties and methods.
Note: Within the graphic context represented by the Graph class, any of the objects above listed are in fact created by and accessed through the GraphSet class, which is explained below.
Objects of the following classes are only created by Graph and can be accessed through 'get' methods:GraphSet - A GraphSet is an object
used to group series separately and display them against multiple scales. Each existing GraphSet creates
and gives access to the following types of objects:
ScrollingLabel - Provides properties and methods of a scrolling label that follows the movement of the mouse cursor showing the label corresponding to series data points under the cursor.
A series is a sequence of data visually depicted in different styles, as lines,
bars, stacked bars, points, etc. The style to be chosen is based on the type of analysis to be
carried out and the characteristics of the data source.
JetChart implements the class AbstractSerie
as an abstract representation of a series. More specialized classes extends AbstractSerie
to implement the properties and methods of different types of series.
The following types of series are currently available:
Line series - A line series is generally used to show the progress of a sequence of values during a period of time. Data points are connected by lines, following a regular progression along the labels axis.
Area series - An area series is similar to a line series, with the area between the line and the x axis filled in with a solid color.
Point series - A point series is displayed as a sequence of geometric shapes, as squares and triangles. It is similar in definition to a line series.
Bar series - A bar series is used to display summarized information, allowing for a comparison between the elements of a group of related data. Each element value is depicted as a vertical or horizontal bar, placed on top of the labels axis.
Stacked bars series - Stacked bar series are similar to bar series. The difference is that each bar is subdivided into sections with individual values, showing the contribution that the sections make to the whole.
Pie series - A pie series is used when it is necessary to compare values of a data set against each other, taking the whole series amount as a reference.
OHLC bar series - A series used in financial charts.
OHLC line series - A series used in financial charts. This series is similar to the line series, except for the number of values associated with a data point.
CandleStick series - A series used in financial charts.
XY series - An XY series is used in scatter charts. Each data point is associated with two values which are translated into xy coordinates in a cartesian coordinates system. The x and y values coordinates are calculated against a horizontal and a vertical scales, respectively. A pair of values is depicted as a geometric shape, as a square, a circle or a triangle.
XY line series - An XY line series is another type of scatter series. Similar to XY series, data points are scattered on the graph area, but connected by lines rather than displayed as shaped points.
XY image series - An XY image series is also a scatter series. Images are displayed on the position of data points.
Bubble series - A bubble series, like any other type of scatter series, is a sequence of xy pairs whose coordinates are calculated with respect to a cartesian coordinates system. Additionally, there is a 'z' value that aggregates a third dimension to each data point. A data point is depicted as a circle whose diameter is calculated with respect to the z value.
The painting process is based on a delegation model. All series above described implement a painting method, invoked during the rendering process by subclasses of GenericGraph.