Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------


The drilldown in this example is done in the traditional SAS/Graph way,
but using the new "goptions device=javaimg" rather than gif ...


First, a character variable is created, containing the html tags for
the drilldown (href=) and the text charttip/rollover-text (title=)
as follows ...

   length htmlvar $500;
   htmlvar='title='||quote(
    'State: '|| trim(left(st)) ||'0D'x||
    'Population: '|| trim(left(put(population,comma12.0)))
   )
   ||' '||
    'href="http://www.state.'||trim(left(lowcase(st)))||'.us"';


Then that variable is specified using the "html=" option in the
SAS/Graph "proc gplot" as follows...


   proc gchart data=mydata;
   hbar st / discrete
    type=sum sumvar=population
    ascending
    nostats
    maxis=axis1
    raxis=axis2
    autoref cref=gray
    clipref
    coutline=black
    cframe=white
    html=htmlvar            <--------  here!
    des="" name="&name" ;
   run;


The output is created using ODS HTML, and "goptions device=javaimg".
Device=javaimg is similar to device=gif, in that two output files 
are produced - an html file containing the drilldown & charttip info,
and a png file containing the graph (rather than a gif file).
The person viewing the graph will view the html file, and it will
display the png file and line up the drilldown/charttip info in
the correct locations.

Back to Samples Index