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 ...
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_legend=" option in the
SAS/Graph "proc gchart" as follows (this is very similar to using the
html= option, but this puts the drilldowns on color/pattern squares
in the legend, rather than on the bars themselves)...
proc gchart data=mydata;
hbar st / discrete
subgroup=st
type=sum sumvar=population
ascending
nostats
maxis=axis1
raxis=axis2
autoref cref=gray
clipref
coutline=black
legend=legend1
html_legend=htmlvar <-------- here!
des="" name="&name" ;
run;
And the output is created using ODS HTML, and "goptions device=gif",
so that a gif file is created containing the gif, and an html file
is created containing the html charttips & drilldowns. The user will
view the html file, and it will display the gif image.
Back to Samples Index