Skip Headers

Oracle® Chart Builder Application Developer's Guide
Release 1.0
Part No. A96127-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

1
Introducing Oracle Chart Builder

Oracle Chart Builder is a high-performance Java package that helps you create charts for business graphics and performance applications. You can deploy Chart Builder charts in Java applications, Java applets, JavaServer Pages (JSP), servlets, and HTML pages. The speed, automated layout, and image-generation capabilities of Chart Builder make it ideal for online applications.

1.1 What Is Chart Builder?

Chart Builder is a Java class library, conforming to JavaBean conventions, for creating static, interactive, and dynamic charts. The interface is uniform, meaning that you use the same API, whether you are using Java applications, Java applets, JavaServer Pages (JSP), servlets, or HTML pages to build your charts. You can quickly create a chart by taking advantage of the default values built into the library. You can customize the presentation of your data by using the full set of properties and methods.

Chart Builder makes it easy to:

Chart Builder is optimized for real-time charting and typically generates a chart in less than one second. For example, even on a laptop computer, Chart Builder generates charts containing hundreds or thousands of points in less than one second.

1.2 Who Should Use Chart Builder?

Chart Builder is ideally suited to many situations:

1.3 Types of Charts

With Chart Builder, you can create many types of static, interactive, and dynamic charts. These charts can take the form of axis charts and pie charts.

1.3.1 Axis Charts

Axis charts include all charts that contain axes. The data is plotted according to where it lies along the edges (axes) of the chart. An axis chart contains a horizontal axis and a vertical axis. The horizontal axis is called the X-axis. The vertical axis is called the Y-axis. An axis chart can contain two Y-axes.

Chart Builder supports the following types of axis charts:

  • Bar charts

  • Line charts

  • Area charts

  • Stock charts

You can build axis charts that contain multiple series (sets of data), such as clustered bar charts or multiple-line area charts, dual axes, mixed frequencies, mixed graph types, annotations, and point labels. The rest of this section describes the variations in axis charts.

Bar charts compare one or more sets of values by using rectangles whose lengths are proportional to the values. Bar charts can be oriented vertically or horizontally. You can add point labels (text that labels a particular bar) to bar charts. The following table shows a vertical bar chart and a horizontal bar chart with point labels:

Vertical Bar Chart Horizontal Bar Chart with Point Labels
Description of barchart.gif follows
Description of the illustration barchart.gif  
Description of hbarchart.gif follows
Description of the illustration hbarchart.gif  

You can stack or cluster bar charts, either vertically or horizontally, to show multiple series in one chart. The following table shows a vertical stacked bar chart and a vertical clustered bar chart:

Stacked Bar Chart Clustered Bar Chart
Description of stackbarchart.gif follows
Description of the illustration stackbarchart.gif  
Description of clustbarchart.gif follows
Description of the illustration clustbarchart.gif  

You can add drop shadows or a three dimensional (3-D) effect to all types of bar charts, as the following table shows:

Drop Shadows on a Bar Chart 3-D Effect on a Bar Chart
Description of barchart_drop.gif follows
Description of the illustration barchart_drop.gif  
Description of clustbarchart3d.gif follows
Description of the illustration clustbarchart3d.gif  

Line charts and area charts show changes for a specific set of data. These types of charts are often used to show the changes or trends for one or more subjects over a period of time. The following table shows a line chart and an area chart:

Line Chart Area Chart
Description of linechart.gif follows
Description of the illustration linechart.gif  
Description of areachart.gif follows
Description of the illustration areachart.gif  

You can use markers to show each value on a line chart. You can annotate all types of axis charts. The following table shows a line chart with markers and an area chart with annotations:

Line Chart with Markers Annotated Chart
Description of linemarkchart.gif follows
Description of the illustration linemarkchart.gif  
Description of annotareachart.gif follows
Description of the illustration annotareachart.gif  

Stock charts show values that correspond to the open, high, low, and close values of a given time period. Stock charts use one of the following formats: High-Low-Close, Open-High-Low-Close, or candlestick, as shown in the following table:

High-Low-Close Chart Open-High-Low-Close Chart Candlestick Chart
Description of hilowclo.gif follows
Description of the illustration hilowclo.gif  
Description of openhilowclo.gif follows
Description of the illustration openhilowclo.gif  
Description of candle.gif follows
Description of the illustration candle.gif  

Multiple-series charts display the values of more than one series of data in any axis chart. Stacked and clustered bar charts are shown previously. The following table shows line and area charts with multiple series:

Multiple-Series Line Chart Multiple-Series Area Chart
Description of line_mult.gif follows
Description of the illustration line_mult.gif  
Description of area_mult.gif follows
Description of the illustration area_mult.gif  

Mixed graph-type charts let you use different graph types for each series in one chart. Mixed-frequency charts show each series with a different timestamp frequency. For example, one series can show monthly data and one series can show quarterly data. The following table shows a chart with both line and bar graph types and a chart with mixed-frequency data:

Mixed Graph-Types Chart Mixed-Frequency Chart
Description of mixed.gif follows
Description of the illustration mixed.gif  
Description of mixed_freq.gif follows
Description of the illustration mixed_freq.gif  

Dual-axis charts display values along two Y-axes. For example, a chart can show values for Goods and Services scaled to one Y-axis and values for Imports scaled to a second Y-axis. You can use mixed-frequency data with dual-axis charts. Chart Builder handles charts containing positive and negative values. The following table shows a dual-axis chart and a chart with both positive and negative values:

Dual-Axis Chart Chart with Positive and Negative Values
Description of dualaxis.gif follows
Description of the illustration dualaxis.gif  
Description of posneg.gif follows
Description of the illustration posneg.gif  

Subcharts stack one chart above another. They are commonly used to display volume data below market data, as the following table shows:

Subchart
Description of subchart.gif follows
Description of the illustration subchart.gif  

For information about building basic axis charts, see Section 2.2.

1.3.2 Pie Charts

A pie chart is a circular graph in which the relative percentages of the values are represented by wedges or slices of the pie. For example, you can use a pie chart to compare the volume of exports to various countries.

As with axis charts, Chart Builder positions the labels automatically. If a label cannot fit within a pie slice, Chart Builder places the label outside of the pie. You can label the pie slices with string labels, the values or the percentages. You can place the labels in a legend.

The following table shows a pie chart with labels inside the pie and one with the labels in a legend:

Pie Chart Pie Chart with External Labels
Description of piechart.gif follows
Description of the illustration piechart.gif  
Description of piechartlegend.gif follows
Description of the illustration piechartlegend.gif  

You can add a 3-D effect to pie charts, as the following table shows:

Pie Chart with 3-D Effects
Description of piechartlegend3d.gif follows
Description of the illustration piechartlegend3d.gif  

For information about building basic pie charts, see Section 2.3.

1.3.3 Interactive Charts

An interactive chart is a chart that detects mouse movement over chart elements and associates that movement with particular actions, such as highlighting a bar or drilling down to another chart.

Chart Builder supports two types of interactive charts:

  • Image map: For HTML pages that do not rely on running Java in the browser, Chart Builder supports interactive charts that use chart image maps. You can automatically generate the image maps using Chart Builder. For example, an HTML page can display another chart when a user clicks on a slice in a pie chart.

  • Event model: For Java applications and Java applets, Chart Builder supports an event model that allows your application to detect mouse events over chart elements, such as the mouse entry and exit from individual bars. When the event occurs, your application can take an action, such as drilling down to another chart or highlighting the bar.

For information about building interactive charts, see Section 5.1.

1.3.4 Dynamic Charts

A dynamic chart is a chart that can load data that is not defined when the application is created, and the application can update the data as it is refreshed.

Chart Builder provides several methods that you can use in the context of the standard Java event model to detect events on series elements in axis charts or slices in pie charts. These events include mouse-related events such as entering, exiting, dragging, moving, clicking, pressing, and releasing. You use the Java event model to detect the event and the Chart Builder methods to detect the series element or pie slice in which it occurred. Then, you use Chart Builder methods to dynamically load the data into the chart. For example, you can add data incrementally to the Y-axis when a user clicks a button in the Java application.

For information about creating dynamic charts, see Section 5.2.


Previous Next
Oracle Logo
Copyright © 2002 Oracle Corporation

All rights reserved | | Ad Choices.
Go To Table Of Contents
Contents
Go To Index
Index