Pie Graph Data Requirements

Using ADF Graph Components 24-15

24.3.13.5 Candle Stock Graphs: Open-Close

Data requirements for an open-close candle stock graph are: ■ Each stock marker requires a group of two data values in the following sequence: Open, Close. To display stock data for more than one day, data must be in multiples of two, such as two data values for Monday, two data values for Tuesday, and so on. ■ A series or set of data is represented by markers for one stock. Candle stock graphs allow the display of values for only one stock. For this reason, no legend appears in these graphs and you should show the series label which is the name of the stock in the title of the graph.

24.3.13.6 Candle Stock Graphs: Open-Close with Volume

Data requirements for an open-close candle stock graph with volume are: ■ Each stock marker requires a group of three data values in the following sequence: Open, Close, Volume. To display stock data for more than one day, data must be in multiples of three, such as three data values for Monday, three data values for Tuesday, and so on. ■ A series or set of data is represented by markers for one stock. Candle stock graphs allow the display of values for only one stock. For this reason, no legend appears in these graphs and you should show the series label which is the name of the stock in the title of the graph.

24.3.13.7 Candle Stock Graphs: Open-High-Low-Close

Data requirements for an open-high-low-close candle stock graph are: ■ Each stock marker requires a group of four data values in the following sequence: Open, High, Low, Close. To display stock data for more than one day, data must be in multiples of four, such as four data values for Monday, four data values for Tuesday, and so on. ■ A series or set of data is represented by markers for one stock. Candle stock graphs allow the display of values for only one stock. For this reason, no legend appears in these graphs and you should show the series label which is the name of the stock in the title of the graph.

24.3.13.8 Candle Stock Graphs: Open-High-Low-Close with Volume

Data requirements for an open-high-low-close candle stock graph with volume are: ■ Each stock marker requires a group of five data values in the following sequence: Open, High, Low, Close, Volume. To display stock data for more than one day, data must be in multiples of five, such as five data values for Monday, five data values for Tuesday, and so on. ■ A series or set of data is represented by markers for one stock. Candle stock graphs allow the display of values for only one stock. For this reason, no legend appears in these graphs and you should show the series label which is the name of the stock in the title of the graph.

24.4 Creating a Graph

You can use any of the following data sources to create a graph component: 24-16 Web User Interface Developers Guide for Oracle Application Development Framework ■ ADF Data Controls: You declaratively create a databound graph by dragging and dropping a data collection from the ADF Data Controls panel. You can create a graph using a data collection that provides row set data as described in the Creating Databound ADF Graphs section in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Hierarchical data: You can create a graph from a data control that provides hierarchical data. However, the current release does not include an implementation of a hierarchical data control that is supported by graph. ■ Tabular data: You can provide CSV comma-separated value data to a graph through the tabularData attribute as shown in Section 24.4.1, How to Create a Graph Using Tabular Data. .

24.4.1 How to Create a Graph Using Tabular Data

The process of creating a graph from tabular data includes the following steps: ■ Storing tabular data in a method in the graph’s managed bean. ■ Creating a graph that uses the tabular data stored in the managed bean.

24.4.1.1 Storing Tabular Data for a Graph in a Managed Bean

The tabularData attribute of a dvt:graph component lets you specify a list of data that the graph uses to create a grid and populate itself. To construct this list, you require an understanding of series and groups of data in a graph as well as knowledge of the structure of the list.

24.4.1.1.1 Series and Groups of Data A graph displays series and groups of data. Series

and groups are analogous to the rows and columns of a grid. Usually the rows in the grid appear as a series in a graph and the columns in the grid appear as groups in the graph. For most graphs, a series appears as a set of markers that are the same color. Usually the graph legend shows the identification and associated color of each series. For example, in a bar graph, the yellow bars might represent the sales of shoes and the green bars might represent the sales of boots. Groups appear differently in different graph types. In a clustered bar graph, each cluster is a group. In a stacked bar graph, each stack is a group. In a multiple pie graph, each pie is a group. A group might represent time periods, such as years. A group might also represent geographical locations such as regions. Depending on the data requirements for a graph type, a single group might require multiple data values. For example, a scatter graph requires two values for each data marker. The first value determines where the marker appears along the x-axis while the second value determines where the marker appears along the y-axis.

24.4.1.1.2 Structure of the List of Tabular Data The list that contains the tabular data

consists of a three-member Object array for each data value to be passed to the graph. The members of each array must be organized as follows: ■ The first member index 0 is the column label, in the grid, of the data value. This is generally a String. If the graph has a time axis, then this should be a Java Date. Column labels typically identify groups in the graph. ■ The second member index 1 is the row label, in the grid, of the data value. This is generally a String. Row labels appear as series labels in the graph, usually in the legend.