Graph - Graph Control

Top  Previous  Next

 

The Graph Control template is the definitive tool that is designed to solve nearly all of your business graphing needs.

 

A drop list divides the template prompts into five (5) distinct categories:

General Initial values Data Sources Display Options Classes

 

General

 

Refresh Automatically

Check this box to direct the templates to generate the appropriate graph refresh each time the window is refreshed, or in reports, each time a record is read. You can also control the refresh of the graph with the appropriate Graph Refresh Button or Code template.

 

Accessibility

Accessibility determines how much access or control you want to give to the user to control the graphing display. Select from the following choices.

Popup Menu

Check this box to create a popup menu that allows the user to control various elements of the graph display. This popup is available when the user RIGHT-CLICKS over the graph control. These elements are controlled in the Display options area.

Tooltip

Check this box to allow a tool tip to be displayed when the user moves the mouse over the graph control. The amount of information displayed is controlled in the Display options area.

Drill Down

Check this box to allow the user to DOUBLE-CLICK on a graph control to generate a call to the template’s DRILLDOWN procedure. Normally, you use this to generate an additional graph based on values extracted from the area of the graph control that was clicked on.

 

Additional settings and design information of the Drill Down technique is located in the Display options View selection.

 

Initial Values

This area of the Graph Control sets the initial display state of the graph when first loaded and viewed by the user. Keep in mind that these values are only applied when the graph control is active and displayed for the first time. The Graph Control template provides additional user control of a graph’s style, type, scale, etc. at runtime.

 

The following options are provided:

 

 

Graph Tab Options

Graph Type

Select an initial graph type to display. For a quick look at the different graph types supported, click here.

Graph subtype

This drop list is available for accumulator graph types (Bar and Column). Choose from simple, which displays bars and cylinders of variable length, or normalized, which makes all bars and columns equal height, and normalizes each node value accordingly.

Graph figure

Select the type of lines drawn for the Graph Type selected will be a bar (rectangular) or cylinder (circular)

3D-effect

Select Yes from the drop list if you wish to enable a three-dimensional graph effect when the control is first loaded.

Auto Swap Axis

Select Yes from the drop list if you wish to move the axis label when switching from bar to column graph types. If you select No, the axis labels will remain fixed as the axis points shift between these graph types.

 

Title Tab Options

The title simply refers to a textual string that displays at the top of the graph control.

Title

Select Yes from the drop list if you wish to display a title when the graph control is first loaded.

Properties – Title Text

Enter a string to display as the graph title. You can also press the ellipsis button to select a variable’s contents to use for the graph title. Make sure to place an explanation point in front of the variable name (i.e., !LOC:Title). Press the F button to set an initial font and style for the graph title.

Legend Tab Options

This option controls a graph’s guide or key that helps the user understand what they are looking at.

Location

From the drop list, select the location that the legend will appear in relation to the graph. If you do not wish to display a legend, select None from the drop list.

Box

Select Yes from the drop list if you want to surround the legend with a box.

 

Axis Tab Options

The Axis tab specifies the line drawing and appearance of the X and Y axis of the graph control displayed.

General

The template prompts on this tab apply to attributes shared by both the X and Y axis.

Axis styles

Axis styles define the lines and types of measurement intervals that you can display around the graph type selected. Select None if you do not wish to display any X and Y-axis lines. Select Standard to display the X and Y-axis with a maximum of measurement interval (tick marks) for accurate graph reading. Select Long to display the X and Y-axis with a minimum of measurement intervals for reading the graph.

Name

You can define a name to use for both the X and Y-axis in their respective tab controls. This prompt gives you the ability to disable both of them when the graph is initially loaded. The user can use the popup menu feature (if enabled) to allow the axis names to be displayed when needed. Select Yes to display any defined axis names when the graph control is initially loaded. Select No to hide the names when the graph control is initially loaded.

Grid

Grid lines are dotted lines that are overlaid on top of the graph control. You have the option in the respective X-Axis and Y-Axis tab controls to enable them. In this prompt, select No to disable all grid lines when the graph is first loaded, or select Yes to display any grid lines that are enabled in the X-Axis and Y-Axis tab controls

Scale Style

Select Linear from the drop list to specify equal increments of scaling to use in your graph control based on the highest maximum data point value. Select MS-Word to define a scaling technique used by MS-Word that rounds off axis values. This type of scaling should be used when a maximum value can cause linear scaling to give a skewed or distorted graph presentation.

Scale min/max

Select Yes to activate graph scaling based on minimum and maximum data point values. The graph minimum scale will be based on the lowest data point value (i.e., instead of zero). This technique is useful for an optimum graph display when all data point values fall within a relative contiguous range.

 

 X-Axis (Horizontal Properties)

This tab control provides the initial values for X-Axis properties. Keep in mind that many of the following settings are enabled or disabled by the General sub tab discussed above:

 X-Axis Label

Press the ellipsis button to select a variable to use as the X-Axis Label. This label is displayed on the graph control’s x-axis.

 Format of values

Press the ellipsis button to build a picture using the Edit Picture String dialog, or manually enter a valid picture that will be used to format the numeric elements displayed on this axis.

 Name

Enter a string value, or press the ellipsis button to select a variable to use as the description of this axis. Press the F button to specify a special font and font size to use. The description is used on the tool tips or target controls that are activated when the mouse moves over the axis label area.

 Grid

Grid lines are dotted lines that are overlaid on top of the graph control. In this prompt, select No to disable all vertical grid lines when the graph is first loaded, or select Yes to display any vertical grid lines.

 Color

Press the ellipsis button to select a color to use for the X-Axis line.

 Thickness

Enter a thickness in dialog units to use for the X-Axis line.

 Scale interval

Enter a numeric value to designate the "hash mark" intervals that will be displayed on the X-Axis.

 

 Y-Axis (Vertical Properties)

This tab control provides the initial values for Y-Axis properties. Keep in mind that many of the following settings can be enabled or disabled by the General sub tab discussed above:

Y-Axis Label

Press the ellipsis button to select a variable to use as the Y-Axis Label. This label is displayed on the graph control’s y-axis.

 Format of values

Press the ellipsis button to build a picture using the Edit Picture String dialog, or manually enter a valid picture that will be used to format the numeric elements displayed on this axis.

 Name

Enter a string value, or press the ellipsis button to select a variable to use as the description of this axis. Press the F button to specify a special font and font size to use. The description is used on the tool tips or target controls that are activated when the mouse moves over the axis label area.

 Grid

Grid lines are dotted lines that are overlaid on top of the graph control. In this prompt, select No to disable all horizontal grid lines when the graph is first loaded, or select Yes to display any horizontal grid lines.

Grid lines are also dependent on the graph type. For example, if you are using a bar graph style with a certain thickness, the grid lines may be hidden.

 Color

Press the ellipsis button to select a color to use for the Y-Axis line.

 Thickness

Enter a thickness in dialog units to use for the Y-Axis line.

 Scale interval

Enter a numeric value to designate the "hash mark" intervals that will be displayed on the X-Axis.

 

 Grouping

 Sort

If your data points are grouped together, this option specifies whether to group by Name type (the data points of the graph are alphanumeric) or by ID (the data point of the graph should be numerically sorted).

For example, if a data point is a string type containing numeric data, selecting Name will sort the data like this:

1, 101, 1001, 20, 203, 2033

where an ID sort will sort the values above as follows:

1, 20, 101, 203, 1001, 2033

 Sequence of Sorting

Specify that the Initial Value Sort Grouping selected above will be in Ascending or Descending sequence.

 

Node Tab Options

Essentially, a graph’s architecture is composed of a finite set of dots called nodes, connected by links called edges. This section focuses on the node parameters of your graph.

 

dependent on the graph type used, nodes determine how a graph is rendered, and identifies key data element values used to construct the graph.

 

Node type

Select how a node will be represented. Choose Triangle, Square, or Circle from the drop list. If you wish to hide the nodes in your graph, select None.

Node radius

Enter a numeric value manually or by spin control that will determine the size of a radius of a node point in dialog units. If omitted, the default size is 3.

Minimum/Maximum

Select Yes if you wish to identify Maximum and Minimum node values in your graph. These special nodes will appear slightly larger than the other nodes.

Text of node

Each of your graph node points can have an assortment of values assigned to them.

 Show Label on Nodes

Select Yes if you would like the data point labels to be displayed at each node point.

 

The Graph type you select will control whether or not a Node label can be displayed. For example, a bar graph can hide a node label, where a line graph will not.

 Show Value on Nodes

Select Yes if you would like the data point values to be displayed at each node point.

 Background

Select Yes if you would like the label and/or value to display its background color defined. If you would like these text fields to have a transparent background, select No.

 Best position

Select Yes if you would like the template to calculate the best position for your node label or value. If you select No, the node label or value will always appear to the upper right of the node point, and some values may be clipped from the graph’s display.

 

Other tab options

 

 Zoom

 Zoom

Select the initial zoom setting when the graph control is first displayed. The Auto setting will zoom to a "best fit" sizing.

 ToolTip

 ToolTip

Select Yes from the drop list to automatically display tool tips when the graph control is first displayed.

Best Position

Select Yes from the drop list to allow the tool tips to "float" as you drag your mouse near the edge of the graph control. Select No if you want the tool tip display to be cropped or truncated as you move the mouse to the edge of the graph control.

 

Indent

Indents for drawing

The Indent tab sets margins from the edge of the graph control where the graph data will be written. Values are in dialog units. Use the spin controls to set the margins for Top, Bottom, Left, and Right.

Print

The Graph control template has powerful built-in support for printing your graphs. The following initial settings are available.

Print Options

Preview

Select Yes to call the Print Preview window prior to printing your Graph control.

Orientation

Select Portrait, Landscape, or As on Printer (printer default) from the drop list to designate how the graph control will be printed on your paper.

Indents from edges of a paper (mm)

Specify the non-printable area of your printed output by setting the Top, Bottom, Left, and Right indents in millimeters.

Box

Select Yes if you would like to print a box (border) around the printed graph control.

Print Best Fit Options

Horizontal alignment

The Best Fit option calculates the best size that the graph can be rendered to the print engine based on the selected paper size. In addition, the graph template will position your best fit output, based on Left, Center, or Right horizontal alignment.

Vertical alignment

Position your best fit output, based on Top, Bottom, or Center vertical alignment.

Other

Wallpaper

Select Tiled, Stretched, or Centered from the drop list to display a graphic image wallpaper style when the graph control is first displayed. Press the ellipsis button to select a valid graphic image.

Save As

Press the ellipsis button to select a variable that will hold the name of a Windows Meta File (*.WMF) that will store the graph control’s contents. This file is written when the user selects "Save" from the popup menu. You can also enter a string filename (Example: ‘mygraph.wmf’)

 

Data sources

Data sources identify the source of the values that are plotted for the graph control. The prompts that follow are the heart of this powerful template. Multiple sources are possible. Press the Insert button to add a new data source, Properties to examine an existing data source, or Delete to remove a data source.

The following template prompts are provided:

Data Source tab options

Source Name

Enter a meaningful description that will uniquely identify the data source. You can enter up to 255 characters.

Source

Select File if the data values used for the Graph Control will be extracted from a data table. Select Queue if the data points will be extracted from a global or locally defined QUEUE.

Data From File

The following prompts will be available when you select File as the Data Source.

This section simply controls how the file will be processed. As the file is processed, there will be field values in the records that are read that will be used as the Points used for the graph control.

Key to Use

Press the ellipsis button to select an optional key that will be used to process the file in a specific sequence.

Record Filter

Type a valid Clarion expression to limit the contents of the processed data source to only those records causing the expression to evaluate to true (nonzero or non-blank).

Range Limit Field

In conjunction with the Range Limit Type, specifies a record or group of records for inclusion in the list. Choose a field by pressing the ellipsis (...) button. The range limit is key-dependent. Range Limits are generally much faster than filters.

Range Limit Type

Specifies the type of range limit to apply. Choose one of the following from the drop-down list.

Current Value

Limits the key to the current value of the Range Limit Field.

Single Value

Lets you limit the key to a single value. Specify the variable containing that value in the Range Limit Value box which appears.

Range of Values

Lets you specify upper and lower limits. Specify the variables containing the limits in the Low Limit and High Limit boxes.

File Relationship

Lets you choose a Range Limiting File from a 1:MANY relationship. This limits the list to display only those child records matching the current record in the parent file. For example, if your list was a list of Orders, you could limit the display to only those orders for the current Customer (in the Customer file).

SQL Filter

When the active data source is using an SQL Accelerator driver, SQL Accelerator Drivers convert standard Clarion file I/O statements and function calls into optimized SQL statements, which they send to their backend SQL servers for processing. If you would like to filter an SQL table using SQL statements, press the ellipsis button to select a variable that will hold the SQL statement.

You can also manually enter an SQL filter expression into this prompt.

 Additional Sort Fields

The purpose of this group is to add additional sort fields to the default sequence that the data source is processed. This sequence is applied to the data source’s default sort behavior. If no default sort is specified (no key), the additional sort fields’ dialog sets the primary sort.

 

Press the appropriate update buttons to add, change or remove a sort field. On the Field prompt, press the ellipsis button to select a field name from the Select Column dialog. In the Sequence drop list, select Ascending or Descending to designate the sort fields’ sort sequence.

 

Data From Queue

The following prompts will be available when you select Queue as the Data Source.

Queue Name

Press the ellipsis button to select a valid Queue label from the Select Column dialog. At press time, an exclamation point is automatically prepended to the name that you select.

  Sort Fields

Sort Fields designate the order that the queue will be read by the data source. This improves the internal processing of the graph’s data points. Press the appropriate update button to add, change or remove a queue’s sort field. On the subsequent Sort dialog, add each Sort field by pressing the ellipsis, then select Ascending or Descending from the Sequence drop list.

Record Filter

Press the ellipsis button to select a variable to use in a filter expression for the processed queue. This is usually a Boolean (True/False) condition used to reject certain queue records. You can also manually enter a filter expression in this field.

Points tab options

Each point that you create in this section becomes a reference point, or node, for your graph control. How these points are displayed depend on a number of factors, including graph type, initial settings, etc. It is important to establish your data source first before attempting to set any data points.

Series Name

Enter a descriptive name for your point "series". A series represents a collection of data values read from a file (table) or queue and consolidated to a single graph result. This description is used on the graph’s legend and node to describe this data point.

"Series Name" is synonymous with "Diagram Name".

Fill

The Fill button controls how each data series is displayed. This display is dependent on many factors, including graph type (bar, line, etc.) and initial settings. The following prompts are provided:

Style

Currently, Solid is the only fill style that you can select.

Type

This refers to the color type. You can specify a Fixed , Variable, or a Default color type. Default generates a specific color determined internally by the internal class methods referenced by the templates.

Color

If you have selected a Fixed color type, press the ellipsis to select a color from the Color dialog. If you have selected a Variable color type, press the ellipsis to select a variable that will store a valid color equate.

Grouping of point

Grouping of point designates that the active point will be displayed together with other points that name the same group. Select Yes to group this data point. Select No if this data point will be separate and distinct from other data points.

Select No here if your graph type will be a linear type (line graph scatter graph, etc.). Grouping of points are best used with Bar and Column graph types.

Name

Press the ellipsis button to select a variable name that this data point will associate with. Different data points that you need to group together should have the same variable value (i.e., job hours grouped by department name – select !DEP:name here.)

Text

Press the ellipsis button to select a variable name that this data point will be associated with. The contents of this variable will be displayed along with the data point (node) on the graph control. Your graph type selected and Initial settings may dictate how this value is displayed.

Point

Press the ellipsis button to select a variable name that this data point will be distinctly associated with. This prompt is only enabled when Grouping is set to No.

Record Action

Select from the drop list how each record read (set by the Data Source parameters) will be processed into the data point.

 

If you would like every data value read to be displayed separately on your graph control, select Graph from the drop list.

If you would like every value read by the data source to be counted together into a data point, select Count from the drop list.

If you need a summation (addition) of every value read by the data source, select Sum from the drop list.

If you would like every value read by the data source to be averaged together into a single data point, select Average from the drop list.

Field

Press the ellipsis button to select a variable that will be used to determine this data point(or node) value. For example, !EMP:WorkingHours will display the employee’s working hours in the form of whatever Record Action that is selected above.

Make sure that your Field