Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Modifying graph properties – PB Docs 120 – PowerBuilder Library

Modifying graph properties – PB Docs 120

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.

note.gif 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:

To change the title of the graph at execution time, you could
code:

Modify method

In any environment , 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:

Example for Web ActiveX This example changes the label text for the Value axis of
graph gr_emp in the DataWindow control dw_empinfo:

For a complete list of graph properties, see
the DataWindow Reference
.

How parts of a graph are represented

Graphs consist of parts: a title, a legend, and axes. Each
of these parts has a set of display properties. These display properties
are themselves stored as properties in a subobject (structure) of
Graph called grDispAttr.

For example, graphs have a Title property, which specifies
the text for the title. Graphs also have a property TitleDispAttr,
of type grDispAttr, which itself contains properties that specify
all the characteristics of the title text, such as the font, size,
whether the text is italicized, and so on.

Similarly, graphs have axes, each of which also has a set
of properties. These properties are stored in a subobject (structure)
of Graph called grAxis. For example, graphs
have a property Values, of type grAxis, which specifies the properties
of the Value axis, such as whether to use autoscaling of values,
the number of major and minor divisions, the axis label, and so
on.

Here is a representation of the properties of a graph:

Referencing parts of a graph

You use dot notation or the Describe and Modify methods to
reference the display properties of the various parts of a graph.
For example, one of the properties of a graph’s title is
whether the text is italicized or not. That information is stored
in the boolean Italic property in the TitleDispAttr property of
the graph.

This example changes the label text for the Value axis of
graph gr_emp in the DataWindow control dw_empinfo:

For a complete list of graph properties, see
the DataWindow Reference.

You can use the PowerBuilder Browser to examine
the properties of a DataWindow object that contains a graph. For
more information, see the PowerBuilder Users Guide
.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x