Modifying
graph properties
When you define a graph in the DataWindow painter, you specify its
behavior and appearance. For example, you might define a graph as a column
graph with a certain title, divide its Value axis into four major
divisions, and so on. Each of these entries corresponds to a property of a
graph. For example, all graphs have a property GraphType, which specifies
the type of graph.
When dynamically changing the graph type
If you change the graph type, be sure also to change the other
properties as needed to properly define the new graph.
You can change these graph properties at execution time by assigning
values to the graph’s properties in code.
Property expressions
PowerBuilder
You can modify properties using property expressions. For example,
to change the type of the graph gr_emp to Column, you could code:
|
1 |
dw_empinfo.Object.gr_emp.GraphType = ColGraph! |
To change the title of the graph at execution time, you could
code:
|
1 |
dw_empinfo.Object.gr_emp.Title = "New title" |
Modify method
You can use the Modify method to reference parts of a graph.
Example for PowerBuilder
For example, to change the title of graph gr_emp in DataWindow
control dw_empinfo, you could code:
|
1 |
dw_empinfo.Modify("gr_emp.Title = 'New title'") |
For a complete list of graph properties, see the section called “Properties for Graph controls in DataWindow objects” in DataWindow Reference.