Use the Graph binding dialog to map data from an ADF data control onto
the DVT Graph. The following information is available to help
you with this process:
The Graph binding is a data-mapping layer between the ADF Graph data
visualization component and an ADF data control. To
set up this mapping, the Graph binding dialog is used. This
document shows how to use the Graph binding dialog to configure the
data for different Graph types.
Graph types, such as bar, pie, scatter, etc. have different data
requirements. The Graph binding dialog has been designed to
allow for a wide range of mappings between the data as sourced from a
data control and all of the various Graph type specific data models.
The Graph binding dialog is comprised of the following elements:
The basic steps used to fill out this dialog are:
1. Specify the numeric facts or metrics
you want to graph in the “Data Points” section of
the dialog.
2. Specify the data attributes to show on
the axis or legend of the graph in the “Group By”
section of the dialog.
3. Optionally, specify additional data
categories over which the numeric data points will be categorized in
the “Data Points” section of the dialog.
4. Use the Preview tab to see what the
Graph will look like when bound to the data as specified in steps 1-3
above.
Examples:
Graph Type Configurations
Refer to the following examples for details on how to fill out the
Graph binding dialog for the various types of Graphs:
Bar Graphs, Line Graphs, and Area Graphs all have similar data models
and are configured using the Graph binding dialog the same way.
A. Single numeric fact
In this example, a single numeric column of data (Salary) from an ADF
collection is displayed in a bar graph.
Graph binding dialog settings
To configure the DVT Graph shown above with this data, the Graph
binding dialog should be filled out as follows:
Notes about the single numeric fact use case:
In the Data Points section, the numeric data attribute
‘Sal’ is specified, along with a label of
‘Salary’, which is displayed in the legend of the
Graph. The salary data in this case is coming from a typed
data attribute of the data control, so the default setting of Typed
Attributes is used.
In the Group By section, employee name
(‘Ename’) is specified. The names are
displayed as axis labels, as indicated by the Display Group Values
setting.
B. Multiple numeric facts
Three metrics (Salary, Bonus, and Commission), sourced from three typed
attribute columns, are displayed in the following stacked bar graph.
Graph binding dialog settings
To configure the DVT Graph shown above with this data, the Graph
binding dialog should be filled out as follows:
Notes about graphs with multiple numeric facts:
The numeric columns being graphed are all specified in the
Data Points section of the Graph binding dialog. Since the
data is coming from separate data attributes of the data control, using
Typed Attributes is appropriate.
The employee name column is specified in the Group By
section of the dialog. The names will appear as labels on the
ordinal axis of the stacked bar graph.
Setting Display Group Values to In Legend will cause the
Graph to display the employee names in the legend and the numeric facts
to be displayed on the ordinal axis:
Example
2: Setting up Combo Graphs
A Combo Graph, short for Combination, is very much like the
other simple Graph types in terms of data requirements.
However, each series of numeric data is assigned its own marker
type. In this example, Sales is assigned to be bar markers,
Cost is assigned to a line marker, and Profit is assigned to an area
marker.
Graph binding dialog settings
To configure the DVT Graph shown above with this data, the Graph
binding dialog should be filled out as follows:
Notes about the combo graph binding settings:
The order of the facts in the Data Points section of the
dialog is significant. The first data attribute will be
assigned to the first data marker shape (Sales to bar markers in this
case), the second data attribute will be assigned to the second data
marker shape (Cost to line markers in this case), etc.
Selecting a row and pressing the blue arrow icons re-orders the data
attributes.
Example
4: Setting up Bubble Graphs
The bubble graph is useful for visualizing multiple, correlated metrics
at the same time.
Graph binding dialog settings
To configure the DVT Graph shown above with this data, the Graph
binding dialog should be filled out as follows:
Notes about configuring bubble graphs:
For bubble graphs, there must be at least 3 numeric data
attributes specified in the Data Points section of the dialog.
The order of the numeric data attributes specified in the
Data Points section of the dialog maps to the X axis, Y axis, and
bubble size, respectively. In this example, GNP is the first
metric listed in the Data Points section, so it is plotted along the X
axis of the Graph, Life Expectancy is second metric and is plotted
along the Y axis, and Population is listed third and determines the
size of the bubble.
The Group By section the dialog is used to determine what
should appear in the legend of the bubble chart. Therefore,
the Display Group Values should be set to In Legend. In this
example, the Region attribute is used to provide legend entries.
Country is listed as a data category before the numeric
data attributes. The bubble graph binding interprets this to
mean that each country in the data set will have three numeric data
attributes (GNP, Life Expectancy, and Population) and each country will
be shown with its own bubble marker.
Example
5: Setting up Scatter Graphs
Scatter graphs are similar to bubble graphs in that they are useful for
visualizing correlation between data. They are somewhat simpler than
bubble graphs in that they show the relationship between just two
metrics.
This example Scatter Graph uses a subset of the data used in the Bubble
Graph example to show correlation between life expectancy and per
capita income.
Graph binding dialog settings
To configure the DVT Graph shown above with this data, the Graph
binding dialog should be filled out as follows:
Notes about configuring scatter graphs:
For scatter graphs, there must be at least 2 numeric data
attributes specified in the Data Points section of the dialog.
The order of the numeric data attributes specified in the
Data Points section of the dialog maps to the X axis, and Y axis,
respectively. In this example, GNP is the first metric listed
in the Data Points section, so it is plotted along the X axis of the
Graph; Life Expectancy is listed second and is plotted along
the Y axis.
The Group By section the dialog is used to determine what
should appear in the legend of the scatter graph. Therefore,
the Display Group Values should be set to In Legend. In this
example, the Region attribute is used to provide legend entries.
Country is listed as a data category before the numeric
data attributes. The scatter graph binding interprets this to
mean that each country in the data set will have two numeric data
attributes (GNP and Life Expectancy) and each country will be shown
with its own marker.
Example
6: Setting up Stock Graphs
Stock graphs have specific data requirements that must be met in order
to display reasonable results. This section will provide
details on how to map the required data from the ADF DC onto the
different types of stock graphs.
A stock graph requires at least two, and as many as five, numeric
values per marker depending on the type of stock graph being
displayed. The five data attributes specific to stock graphs
are: open, high, low, close, and volume. Some stock
graphs, such as the Open-Close Candle Graph, only display the open and
close values, while others display additional attributes.
Once you have selected the type of graph to be used, the appropriate
data attributes must be mapped onto that graph type.
Mapping data from multiple data attributes
The following example is an Open-High-Low-Close with Volume Candle
Graph. Placing the mouse cursor over a marker shows the data
associated with it. The red marker shows the open, high, low,
and close stock data for Oracle on a specific date, while the blue bar
below it shows volume data. Notice that the data for this
graph comes from separate typed attributes (columns) in the data
control.
Graph binding dialog settings
To configure the DVT Graph shown above with this data, the Graph
binding dialog should be filled out as follows:
Notes about using the Graph Binding dialog with stock graphs:
In this example, the data control provides a separate data
column for each required data attribute (open, high, low,
etc.). Therefore the default setting of Typed Attributes is
used.
For all stock graphs, the order of the attributes listed in
the Data Points section of the dialog must be Open, High, Low, Close,
Volume. If the stock graph type in use only requires a subset
of these attributes, specify them in this order.
The market date attribute is specified in the Data Points
section of the dialog as a Data Category.
The stock symbol attribute is set in the Group By section,
and since stock symbol (ORCL in this example) is constant across dates,
Display Group Values is set to In Legend. (Note:
Stock graphs, in the current release, are intended to show data for
only one stock at a time. As a result, some stock graph
types, such as the one in this example, will not display a
legend. A Graph title can be used to displayed the stock name
if desired.)
Mapping data from a single data attribute
The same graph can be displayed even if the data coming from the data
control is arranged differently. For example, the numeric
data to be graphed may be sourced from a single column.
Notice in this layout, the required stock data (Open, High, Low, Close,
Volume) is repeated in groups of five rows like this:
The Graph Binding dialog is designed to allow for this arrangement of
data and would be configured as follows:
Notes about setting up the Graph Binding dialog when numeric data is
coming from a single data attribute:
Make sure the Name-Value Pairs option is
selected. “Name” in Name-Value Pairs
refers to the attribute that has the metric names.
“Value” in Name-Value Pairs refers to the attribute
that has the metric values.
Provide the “Name” attribute in the
Value Type Attribute dropdown [we should probably rename this dropdown
control to “Name Attribute”], and the
“Value” attribute in the Value Attribute
dropdown. In this example, these are the
‘Measure’ and ‘Data’
attributes, respectively.
Add the same items to the Data Points section of the dialog
as in the previous example. Make sure that the Data
Attributes specified match the metric names in the data (e.g. OPEN,
HIGH, LOW, etc.)