SAS OnlineTutorback||next

Try It! Using the Clinic.Admit data set, create a SAS/GRAPH chart containing drill-down links.

Creating HTML output? Read this first.

  1. Copy the program below and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source).

data work.activity;
   set clinic.admit;
   length DrillDown $ 40;
   if sex='F' then 
      drilldown='HREF="actfem.html"';
   if sex='M' then 
      drilldown='HREF="actmale.html"';
run;

ods listing close;
ods html ? ;
goptions ? ;
title ? ;
proc gchart ? ;
   hbar ? ;
run;

quit;
ods html close;
ods listing;

If you are using SAS software in the OS/390 or CMS operating environments, you can view a sample program for platform-specific reminders.

  1. Replace the question marks (?) with code to

    • add the title Participant Activity Levels by Sex to the chart.

    • specify a location where GIF and HTML output is stored on your system. For this option, add a suboption to specify that no path information is used in the URLs for linked files.

    • name the HTML file active.html. In the CMS operating environment, specify active html as the HTML filename and filetype.

    • set a graph size of 440 x 330 pixels.

    • create a subgrouped horizontal bar chart of activity level (ActLevel) by sex (Sex).

    • link chart elements to the HREF address strings in the variable Drilldown.

  2. Submit the program and view active.html in your browser.

    Return here and select Next.

Solution
back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA.
All rights reserved.

Terms of Use & Legal Information | Privacy Statement