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

Accessing data properties – PB Docs 70 – PowerBuilder Library

Accessing data properties – PB Docs 70

Accessing data properties

To access properties related to a graph’s data during
execution, you use PowerScript graph functions. The graph functions related
to data fall into several categories:

  • Functions that provide information about a graph’s
    data
  • Functions that save data from a graph
  • Functions that change the color, fill patterns,
    and other visual properties of data

How to use the functions

To call functions for a graph in a graph control, use the
following syntax:

For example, to get a count of the categories in the window
graph gr_printer, code:

note.gif Different syntax for graphs in DataWindows The syntax for the same functions is more complex when the
graph is in a DataWindow, like this:

For more information, see the DataWindow Programmer’s
Guide

.

Getting information about the data

The following PowerScript functions allow you to get information
about data in a graph at execution time:

Function Information provided
CategoryCount The number of categories in a graph
CategoryName The name of a category given its number
DataCount The number of data points in a series
FindCategory The number of a category given its name
FindSeries The number of a series given its name
GetData The value of a data point given its series
and position (superseded by GetDataValue, which is more flexible)
GetDataPieExplode The percentage that a pie slice is exploded
GetDataStyle The color, fill pattern, or other visual
property of a specified data point
GetDataValue The value of a data point given its series
and position
GetSeriesStyle The color, fill pattern, or other visual
property of a specified series
ObjectAtPointer The graph element the mouse was positioned
over when it was clicked
SeriesCount The number of series in a graph
SeriesName The name of a series given its number

Saving graph data

The following PowerScript functions allow you to save data
from the graph:

Function Action
Clipboard Copies a bitmap image of the specified
graph to the clipboard
SaveAs Saves the data in the underlying graph
to the clipboard or to a file in one of a number of formats

Modifying colors, fill patterns, and other data

The following PowerScript functions allow you to modify the
appearance of data in a graph:

Function Action
ResetDataColors Resets the color for a specific data
point
SetDataPieExplode Explodes a slice in a pie graph
SetDataStyle Sets the color, fill pattern, or other
visual property for a specific data point
SetSeriesStyle Sets the color, fill pattern, or other
visual property for a series

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