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”.
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.
Open the Window painter and select the window that will contain the graph.
Select Insert>Control>Graph from the menu bar.
Click where you want the graph.
PowerBuilder displays a model of the graph in the window.
Specify properties for the graph, such as type, title, text properties, and axis properties.
Write one or more scripts to populate the graph with data.
See the chapter on manipulating graphs in Application Techniques.
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:
Does not have buttons for specifying property conditional expressions next to properties
Does not have Data, Position, and Pointer property pages
Does have an Other page, which you use to specify drag-and-drop, position, and pointer properties for the graph control
For more information, see “Using the graph's Properties view”.