%let name=bar3; filename odsout '.'; data a; input CATEGORY SERIES $ 3-11 AMOUNT; cards; 1 Series A 5 2 Series A 6.8 3 Series A 9.2 1 Series B 6.5 2 Series B 6.9 3 Series B 5.6 ; run; data a; set a; length htmlvar $500; htmlvar='title='||quote( 'Category: '|| trim(left(category)) ||'0D'x|| 'Series: '|| trim(left(series)) ||'0D'x|| 'Amount: '|| trim(left(amount)) ) ||' '|| 'href="bar4.htm"'; run; run; GOPTIONS DEVICE=gif; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Stacked Bar") style=minimal; goptions noborder; goptions gunit=pct htitle=6 ftitle="albany amt/bold" htext=4.25 ftext="albany amt/bold"; axis1 label=('CATEGORY') offset=(11,11); axis2 label=('AMOUNT') order=(0 to 16 by 4) minor=(number=3) offset=(0,0); pattern1 v=solid color=cx9999ff; /* light blue */ pattern2 v=solid color=cx993366; /* purplish */ pattern3 v=solid color=cxffffcc; /* pale yellow */ title "Stacked Bar"; title2 "Compares the contribution of each value"; title3 "to a total across categories"; proc gchart data=a; hbar category / discrete nostats type=sum sumvar=amount subgroup=series /* this controls the coloring */ autoref clipref cref=graycc maxis=axis1 raxis=axis2 nolegend coutline=black space=2 html=htmlvar des="" name="&name" ; run; quit; ODS HTML CLOSE; ODS LISTING;