Creating Drill-Down Graphs in HTML |
Defining Values for Link
Locations |
Now that you've created the variable (PriDrill ) to store
the HREF addresses, the next step is to supply it with values.
These values will determine what pages are displayed when users click the
bars of the chart. |
Remember that your chart has four bars that track product sales by year.
Because each bar shows only total sales for that year, you'll provide more
detail by making each bar be a link to a page with another chart:
The bar that represents
You'll create the secondary pages and their charts in a moment. For
now, just assign their links to the variable |
General form, IF-THEN statement:
where
|
In this case, your executable SAS statement assigns a text string to
PriDrill . Begin each string with HREF= to
indicate a link address, then enclose the address in quotation marks.
HTML filenames can end in either .html or .htm,
and the HREF location can be any reference that is valid in HTML. |
data work.saletrnd; set finance.prdsal2; format actual dollar10.0; length PriDrill $ 40; if year=1995 then pridrill='HREF="sales95.html"'; if year=1996 then pridrill='HREF="sales96.html"'; if year=1997 then pridrill='HREF="sales97.html"'; if year=1998 then pridrill='HREF="sales98.html"'; run; |
HREF addresses can lead to anchors within HTML
pages. To specify an anchor, add a pound sign
(#) and the anchor name to the HREF address
string.
For example,
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.