%let name=few7; filename odsout '.'; /* SAS Imitation of graph in Stephen Few's book "Show Me the Numbers", p. 185 */ data a; input department $ 1-20 start_range end_range; cards; Information Systems 45 185 Sales 48 183 Engineering 37 165 Marketing 27 140 Financing 29 110 Operations 14 70 ; run; data a; set a; sub='invisible'; value=start_range; output; /* This will be the 'invisible' segment */ sub='visible'; value=end_range-start_range; output; /* This will be the colored/gray segment */ run; data a; set a; length htmlvar $500; htmlvar='title='||quote( trim(left(department)) ||': $'|| trim(left(start_range))||',000 <-> $'|| trim(left(end_range))||',000') ||' '|| 'href="few6.htm"'; run; GOPTIONS DEVICE=gif; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Range Bar Chart") style=minimal gtitle gfootnote ; goptions border; goptions gunit=pct htitle=7 ftitle="arial" htext=5.25 ftext="arial"; goptions xpixels=675 ypixels=300; /* make the default axes and axis labels 'disappear' */ axis1 color=gray value=(color=black) label=(color=black 'U.S. Dollars (thousands)') order=(0 to 200 by 25) minor=none offset=(0,0) major=(height=.5); axis2 color=white value=(color=black justify=right) label=none ; pattern1 v=solid color=white; pattern2 v=solid color=gray77; title1 ls=3 "Salary Ranges by Department"; title2 h=2 " "; proc gchart data=a; hbar department / type=sum sumvar=value descending subgroup=sub noframe nostats raxis=axis1 maxis=axis2 space=2.5 nolegend coutline=same html=htmlvar des="" name="&name" ; run; quit; ODS HTML CLOSE; ODS LISTING;