ObjectAtPointer

Description

Finds out where the user clicked in a graph. ObjectAtPointer reports the region of the graph under the pointer and stores the associated series and data point numbers in the designated variables.

Applies to

PowerBuilder DataWindow

DataWindow control

Syntax

PowerBuilder

grObjectType dwcontrol.ObjectAtPointer ( string graphcontrol, REF integer seriesnumber, REF integer datapoint )

Argument

Description

dwcontrol

A reference to the DataWindow control containing the graph.

graphcontrol 

A string whose value is the name of the graph in the DataWindow control.

seriesnumber

In PowerBuilder, an integer variable in which you want to store the number of the series under the pointer.

datapoint

In PowerBuilder, an integer variable in which you want to store the number of the data point under the pointer.


Return value

Returns a value of the grObjectType enumerated datatype identifying the type of object under the pointer if the user clicks anywhere in the graph (including an empty area) and a null value if the user clicks outside the graph.

For a list of type values, see grObjectType.

Usage

The ObjectAtPointer function allows you to find out how the user is interacting with the graph. The function returns a value of the grObjectType enumerated datatype identifying the part of the graph. When the user clicks in a series, data point, or category, ObjectAtPointer stores the series and/or data point numbers in designated variables.

When the user clicks a data point (or other data mark, such as line or bar), or on the series labels in the legend, ObjectAtPointer stores the series number in the designated variable. When the user clicks on a data point or category tickmark label, ObjectAtPointer stores the data point number in the designated variable.

When the user clicks in a series, but not on the actual data point, ObjectAtPointer stores 0 in datapoint and when the user clicks in a category, ObjectAtPointer stores 0 in seriesnumber. When the user clicks other parts of the graph, ObjectAtPointer stores 0 in both variables.

Examples

PowerBuilder

These statements store the series number and data point number at the pointer location in the graph named gr_computers in the DataWindow control dw_equipment in SeriesNbr and ItemNbr:

integer SeriesNbr, ItemNbr
dw_equipment.ObjectAtPointer("gr_computers", &
      SeriesNbr, ItemNbr)