Using graphs in windows

In addition to using graphs in DataWindow objects, you can also place graphs directly in windows and visual user objects. You define properties for a graph control in the Window painter and use scripts to populate the graph with data and to modify properties for the graph at runtime.

This section describes procedures unique to using graphs in windows and visual user objects. For general graph properties, see “Defining a graph's properties”.

Placing a graph in a window

This procedure for placing a graph in a window in the Window painter can also be used for placing a graph on a user object in the User Object painter.

StepsTo place a graph in a window:

  1. Open the Window painter and select the window that will contain the graph.

  2. Select Insert>Control>Graph from the menu bar.

  3. Click where you want the graph.

    PowerBuilder displays a model of the graph in the window.

  4. Specify properties for the graph, such as type, title, text properties, and axis properties.

    See “Defining a graph's properties”.

  5. Write one or more scripts to populate the graph with data.

    See the chapter on manipulating graphs in Application Techniques.

Using the graph’s Properties view in the Window painter

A graph’s Properties view in the Window and User Object painters is similar to the one in the DataWindow painter except that the Properties view in the Window and User Object painter:

For more information, see “Using the graph's Properties view”.