To understand the selections you make when building the graph component, you must understand how the Graph bean obtains sufficient data from your business service's data model to:
The ADF Graph binding is specified in the Customize Graph Binding editor by the data model components you select. For example, if your Model project uses ADF Business Components as the business service, you will select view objects and view object attributes from the Business Components data model.
While Customize Graph Binding editor helps you choose data objects and attributes for a particular graph type, you must be familiar with the data model in order to make the specific choices. In general, when you make a graph type selection in the Graph Editor, the Customize Graph Binding editor displays one attribute for each data point value needed to draw the markers for your graph type. If you select a group type graph, the Customize Graph Binding editor also prompts you to choose a accessor that links the master data collection with the correct detail data collection.
For instance, if you want to plot a Hi-Lo-Close Stock graph type for multiple stocks in the Customize Graph Binding editor, you must choose:
Whereas, if you decide to plot a single stock as a simple bar graph that shows monthly high values in the Customize Graph Binding editor, you must choose:
The following section describes the business services data model requirements in detail.
It is helpful to understand how the Graph bean interprets the data from the business services data model. In general, the requirements of the data model for your ADF Model project depend on:
For example, let's assume a simple graph, such as a Bar graph with the following data is desired:
ENAME SAL Comm
KING 1000 200
CLARK 2000 100
MILLER 1500 50
Each row in this table will correspond to a Series in the graph and each column corresponds to a Group.
Some types of graphs, like the Bar graph, require one value per marker. This is in contrast to other graph types, like the Stock HLC graph, which require three values per marker (high, low and close). When your graph requires multiple data values, it is convenient to store them in separate rows in your database table:
Date High Low Close
10 Jun 03 11 10 11
11 Jun 03 11 7 9
12 Jun 03 10 9 9.5
The Graph beans supports the type of graph whose data is stored in a single table. When your graph requires multiple values, then the data for the chart should be modeled as a master/detail relationship. Each detail provides one series of data, corresponding to the master value. In the Stock graph example above, the data model could look like this:
Master table stock_ticker_table
--------------------------------
ticker symbol
Oracle Corporation ORCL
XYZ Corporation XYZ
Detail table stock_price_table
-----------------------------------
ticker Date High Low Close
ORCL 10 Jun 03 13 12 13
ORCL 11 Jun 03 14 13 13
ORCL 12 Jun 03 15 14 14
XYZ 10 Jun 03 10 9 9
XYZ 11 Jun 03 10 9 9
XYZ 12 Jun 03 10 8 9
In summary, the case of the single-table graph, the data model is simple and need only contain:
In the case of the more complex group type graph, the data model is based on a master-detail relationship and must contain:
About Graph Support in ADF Applications
About Graph Files in ADF Applications
Choosing a Graph Type in
ADF-Enabled Web Pages
Creating Graphs in ADF-Enabled Web Pages
Customizing Graph Style in ADF-Enabled Web Pages
Changing Graph Data in ADF-Enabled Web Pages
Copyright © 1997, 2004, Oracle. All rights reserved.