Service Packs for the SAS9 Platform." />
SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 26115: Create a dashboard with multiple slider chart indicators using a stored process

DetailsCodeOutputDownloadsAboutRate It

This sample uses the GCHART procedure in conjunction with the Annotate facility in the SAS/GRAPH software to create a series of slider chart indicators, and then uses the GREPLAY procedure to arrange the indicators into a dashboard. This version is intended to run as a SAS stored process. It builds on the individual indicator sample, Create a slider chart indicator for a dashboard using a stored process.

In this sample, the pltname parameter of the %DO_RANGE macro is used to specify the name of the SAS/GRAPH GRSEG in which each graph is temporarily stored. Here is an example that creates a slider chart in GRSEG ITCOST:

%do_range(itcost,10000,30000,40000,50000,40458,&light_green, &light_yellow,&light_red,&alert_color,comma8.0,'IT Cost');

The %DO_RANGE macro is called separately for each graph, and each graph is given a unique GRSEG name. The GREPLAY procedure is then used to combine the graphs into a single page using a custom template, which arranges the graphs in a specific order. The custom GREPLAY template is defined by specifying four X and Y coordinates for the rectangular area that will hold each graph. The units of the X and Y coordinates are the percent of the total length of the axis where the coordinate is located, with 0,0 being the bottom-left corner. Each rectangular area is assigned an ID number. Here is the layout of the GREPLAY template:

GREPLAY template layout

Here are the coordinates that place the IT Cost chart near the bottom-left corner of the dashboard in area 5:

   5/llx = 0   lly = 0
     ulx = 0   uly = 50
     urx =25   ury = 50
     lrx =25   lry = 0

where LLX is the lower-left X coordinate, LLY is the lower-left Y coordinate, and so on.

Here is the GREPLAY procedure TREPLAY action statement that draws each chart into the appropriate area of the template:

  treplay
  1:bigtitle 2:satisfy  3:uptime      4:avail
  5:itcost   6:risk     7:training    8:ontime

Note: For convenience and code readability, spacing is used in the TREPLAY action statement to make the layout correspond to the actual location of the charts in relation to one another.

Notice that the ITCOST chart is replayed into area 5.

The physical spacing and layout of the TREPLAY action statement does not have any bearing on the physical layout of the graphs. The actual layout is controlled by the X and Y coordinates that you define in the custom GREPLAY template.

For additional information about creating dashboard applications with SAS/GRAPH software, see SAS/GRAPH Dashboard Samples.




These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.