Chapter Contents

Previous

Next
SAS/GRAPH Output: _getInfo

SAS/GRAPH Output: _getInfo



Returns descriptive information about the last point selected on the graphics output


Syntax
Example

Syntax

CALL NOTIFY (graph-output-name, '_getInfo', list-id);

Argument Type Description
list-id
N returns the identifier of the SCL list containing information about the last point selected on the graphics output. The SCL list contains the following items:

List Item Type Description
SPOT N a list defining the hotspot, if the selected point is a hotspot; if the point is not a hotspot, the value of SPOT is 0
SPOTID N the number of the graph segment within the graph, beginning with 1. If no segment has been selected, the value of SPOTID is 0.
SPOTTYPE N a number identifying the type of graph segment selected:
TEXT C the text of the segment, if the selected point contains text
X N the X coordinate of the selection, in pixels
Y N the Y coordinate of the selection, in pixels


Example

The following example displays a picture called ARROWS in the region named ARROW. The picture consists of four segments representing four arrows. No hotspots are defined. The _getInfo method returns information about where in the picture a click occurred. That information is used to start a different application, depending on which arrow the user clicked.

length info 8;

INIT:
   arrow='sashelp.eisgrph.arrows.grseg';
return;

ARROW:
   if (_status_!=' ') then return;
   call notify('arrow','_get_info_',info);
   segment=getnitemn(info,'spotid');

      /* check to see if we really clicked
         on an arrow */
   if (segment=0) then return;

      /* run the selected application */
   select (segment);
      when (1) call display('north.frame');
      when (2) call display('west.frame');
      when (3) call display('east.frame');
      when (4) call display('south.frame');
   end;
return;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.