Using graphs – PB Docs 126

Using graphs

note.png Supported environments

PowerBuilder and Web ActiveX

Graphs are supported. Because you can print DataStores, PowerBuilder
provides some events and functions for DataStores that pertain to
the visual presentation of the data. However, graph functions such
as CategoryCount, CategoryName, GetData, SeriesCount, and so forth
depend on the visual graph control, which is not created for a DataStore.
These functions return an error value or an empty string when used
with DataStore objects.

Web DataWindow

Graphs are not supported. If you use a DataWindow object that
includes graphs, the graphs are ignored. If you use a DataWindow
object with the Graph presentation style, nothing displays.

It is common for developers to design DataWindow objects that
include one or more graphs. When users need to quickly understand
and analyze data, a bar, line, or pie graph can often be the most
effective format to display.

To learn about designing graphs, see the PowerBuilder
Users Guide
.

Working with graphs in your code

The following sections describe how you can access (and optionally
modify) a graph by addressing its properties in code at execution
time. There are two kinds of graph properties:

  • Properties of the graph definition
    itself

    These properties are initially set in the DataWindow painter
    when you create a graph. They include a graph’s type, title,
    axis labels, whether axes have major divisions, and so on. For 3D
    graphs, this includes the Render 3D property that uses transparency
    rather than overlays to enhance a graph’s appearence and give
    it a more sophisticated look.

  • Properties of the data

    These properties are relevant only at execution time, when
    data has been loaded into the graph. They include the number of
    series in a graph (series are created at execution time), colors
    of bars or columns for a series, whether the series is an overlay,
    text that identifies the categories (categories are created at execution
    time), and so on.

note.png Using graphs in other PowerBuilder controls

Although you will probably use graphs most often in DataWindow
objects, you can also add graph controls to windows, and additional
PowerScript functions and events are available for use with graph
controls.

For more information, see PowerBuilder Application
Techniques
.


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