Graphs

Document path Reference Contents > General Program Functions > Graphs

This subwindow appears in a number of windows (see also links below) and operates as a general purpose graph display object. There are a number of tools you can use to change the graphs appearance. It supports the Graph Functions Menu context menu which provides additional functions.

Linux Sun Solaris LINUX and SUN SOLARIS ONLY: Graphing is not supported on terminals using the Linux or Sun Solaris operating systems.

Button

Action

Sliders

Open or close graph control sliders. This only operates on certain graph types such as 3D. It opens and closes a control window that allows you to change the perspective and zoom of the graph image.

Swap

Swap graph axis.

Major Type List

To set the major type of graph. Some graph types are likely to be inappropriate for the data.

Minor Type List

To set the minor-type of the graph. The available minor types depend on the major type.

Orientation

To set the orientation of the graph.

Y Labels

A control to adjust the appearance and frequency of Y axis labels.

X Labels

A control to adjust the appearance and frequency of X axis labels.

Modify

Click to switch into modify mode where you can select objects in the graph and change their appearance. You can select most text element on the graph and increase or decrease the font size. You can also change the position or, if the resize checkbox is checked, the size of some objects using the buttons.

Customisation CUSTOM CAPABILITY:

You can use this subwindow on any custom window. Place a subwindow object on your window and set the following properties:

Property

Value

classname

VISION.wGraphSub

parameters

Your graph data list variable,Major Type,MinorType for example: iGraphData,kGR3D,kGR3DBars

nobackground

kTrue

The object has two public methods that can be called from within your window methods:

$LoadGraphData(DataList, MajorType, MinorType, Horizontal)

The method loads the data into the graph and sets the graph types. It takes 4 parameters: 1. The list variable containing the data. 2. The graph major type constant. 3. The minor type constant. 4. kVertical or kHorizontal for the orientation of the graph. The constants are available under the Constants tab of the Catalogue; select Graph-Types. For example:

Do $cinst.$objs.GraphSubWin.$LoadGraphData(iDataList,kGR3D,kGR3DBars,kHorizontal)

Where GraphSubWin is the name you have given the subwindow object and iDataList is your data list variable.

$SetTitles(TitlesRow)

The method sets the text titles in the graph. It takes one parameter of a row variable created using the row() command with 9 character columns. Typically you would use:

Calculate iTitlesRow as row(#S1,#S1,#S1,#S1,#S1,#S1,#S1,#S1,#S1)

Each column needs to be set with the following texts, if appropriate:

C1 = maintitle
C2 = subtitle
C3 = footnote
C4 = seriestitle
C5 = grouptitle
C6 = xaxistitle
C7 = y1axistitle
C8 = y2axistitle
C9 = zaxistitle

Generally you would use the following code:

Calculate iTitlesRow as row(#S1,#S1,#S1,#S1,#S1,#S1,#S1,#S1,#S1)
Do iTitlesRow.$clear()
Calculate iTitlesRow.C1 as 'My Graph Title'
Calculate iTitlesRow.C2 as 'Subtitle'
. . . .
Do $cinst.$objs.GraphSubWin.$SetTitles(iTitlesRow)

Where GraphSubWin is the name you have given the subwindow object and iDataList is your data list variable.

See also: -

Compiled in Program Version 3.10. Help data last modified 22 MAY 2008 08:25. Class wGraphSub last modified 27 FEB 2008 06:24:51.

Document path Reference Contents > General Program Functions > Graphs