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

Support

Sample 26129: Create a dashboard with multiple dial meter indicators for use in a portlet

DetailsCodeOutputDownloadsAboutRate It

This sample uses the Annotate facility and the GANNO procedure in the SAS/GRAPH software to create a series of dial meter indicators, and then uses the GREPLAY procedure to arrange the indicators into a dashboard. This version is intended for use in the webDAV content portlet in SAS Information Delivery Portal software. For a sample of an individual indicator, see Create a dial meter indicator for use in a portlet.

The %DO_GAUGE macro is used to create different gauge charts of varying colors, ranges, and so on. For information on the %DO_GAUGE macro, see Create a dial meter indicator for use in a portlet. The dashboard in this sample is not necessarily a complete dashboard, but is a starting point to show you how to create custom gauges and how to insert them into a dashboard. Also, although gauges are commonly used in dashboards, other chart types might be more appropriate for displaying your data.

The %DO_GAUGE macro in this sample is enhanced to accept a new parameter that specifies the name of the GRSEG in which the gauge chart is stored temporarily. Here is the syntax of the enhanced %DO_GAUGE macro:

%macro do_gauge(mydata, major_tick_by, minor_tick_by, titletext, foottext, grseg_name);

In this sample, the %DO_GAUGE macro is called four times, which stores four gauge charts in GRSEGs GAUGE1 through GAUGE4. It then uses the GREPLAY procedure with the l2r2 layout template to place the four gauges on the sample page. The l2r2 layout template is a standard template that ships with SAS. Here is the layout of the l2r2 template:

the l2r2 template layout

Here is the GREPLAY procedure TREPLAY action statement that draws the appropriate gauges into the desired areas of the l2r2 template:

   proc greplay tc=sashelp.templt nofs igout=work.gseg template=l2r2;
    treplay
    1:gauge1 3:gauge3
    2:gauge2 4:gauge4
    des='' name="&name";
   run;

Notice that GAUGE1 is replayed into area 1.

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.