9. Generating Fields from Predefined Templates : How You Can Add a Generated Field to a Frame : The bar_graph Field Template : Create a Bar Graph Field
 
Share this page                  
Create a Bar Graph Field
You can create a bar graph field using the bar_graph field template in the Frame Editor.
To create a bar graph field
1. On the Develop tab, in the Components portlet, open the frame in which you want to create the field from the field template.
2. Click Insert, Field From Field Template.
The Select a Field Template dialog appears.
3. Select the core application and the bar_graph template, and then click OK.
4. Position the field on the frame.
Note:  The bar graph field is large compared to most frame fields. You should allow generous distances between it and adjacent fields.
The Graph Assistant appears.
5. Complete the dialog using the following information:
Database Name
Identifies the database to which you are currently connected. To change the database, click Change Database. The Change Database dialog appears:
a. To change the host, enter its name in the Host field. Then click Databases to display the available databases on that host.
b. Select one of the databases from the list field (or enter the host name, followed by :: and the database name, for example, new_york::openroad).
c. Set any flag supported by the Connect method for a DBSession object in the Flags field.
d. Click OK.
Use Current
When enabled, specifies the database currently displayed in the Database Name entry field:
Table Types
Specifies the types of tables that you want to select from, including User, DBA, and System
Data Source
Specifies the name of a table or view that will provide the data for the bar graph. Enter the name directly into the field or click the = button for a list of tables to choose from.
Horizontal Axis
Specifies the name of a column within the specified table that will provide data for the graph. Enter the name directly into the field or click the = button for a list of columns from which to choose.
Note:  Selecting <auto> causes the horizontal axis to be labeled with sequential numbers starting at the value entered in the Xmin field.
Data Set
Specifies the data sets to be used in the bar graph. You can define up to three data sets. Follow these steps:
6. Select a specific Data Set number by clicking one of the three toggle fields contained within the Data Set box. (Initially Data Set 1 is selected.)
7. In the Data Set box, click the = button next to the Data Set entry field to update the list field with the available data sets (columns), or directly enter the name of the data set to be used into the entry field.
Note:  The data sets map to columns from the Data Source table.
8. (Optional) Specify the legend label to be associated with the Data Set in the Legend Label entry field. (If omitted, the column name entered in the Data Set entry field is used as the default.)
Repeat this process for up to three data sets.
Xmin
Specifies the minimum number of rows (on the horizontal axis) to be graphed
Xmax
Specifies the maximum number of rows (on the horizontal axis) to be graphed
Note:  The Xmin and Xmax values are used to adjust the number of rows to be graphed. When the Horizontal Axis is chosen, the Xmin and Xmax values for that column are retrieved and displayed in these fields.
Rows
An informational field only, initially displays the total number of rows (records) in a table selected as the data source (in the Data Source field). The number of rows (in the Rows field) is then updated by computing a new count using the criteria “xaxis >= Xmin and xaxis <= Xmax”, where xaxis is the Horizontal Axis column name.
Horizontal Axis Label
Specifies a label to be used for the horizontal axis of your graph.
If omitted, this defaults to the column name specified in the Horizontal Axis entry field.
Vertical Axis Label
Specifies a label to be used for the vertical axis of your graph.
If omitted, this defaults to the table name specified in the Data Source entry field.
Y-Axis
Specifies the high, step, and low values that correspond to values that will be displayed in the graph. For more information about the Y-Axis box, see How You Can Edit a Bar Graph Field (see How You Can Edit a Bar Graph Field).
Note:  The High and Low values can be changed but such changes are not recommended.
9. Click Generate.
The graph is created and displayed in the Frame Editor as various components within a subform.
For more information about how to make changes to the generated bar graph, see How You Can Edit a Bar Graph Field (see How You Can Edit a Bar Graph Field).