%let name=icecream; filename odsout '.'; data mydata; format value comma10.0; input state $ 1-2 value; datalines; NC 7573 TN 6235 SC 6000 VA 5429 WV 4230 ; run; /* Set up the mouseover charttip info */ data mydata; set mydata; length htmlvar $200; htmlvar='title='|| quote( 'state: '||trim(left(state))||'0D'x|| "Value: "||trim(left(value))||' ' ); run; data anno_colors1; length function style color $10; retain xsys '3' ysys '3' when 'b' style 'solid'; orig_red= input('ef',hex2.); orig_green=input('65',hex2.); orig_blue= input('48',hex2.); do i=0 to 50 by 2; count+1; function='move'; x=0; y=i; output; function='bar'; x=100; y=i-2; percent=(count-1)/(19); red=orig_red + ( (256-orig_red) * percent ); if red > 255 then red=255; green=orig_green + ( (256-orig_green) * percent ); if green > 255 then green=255; blue=orig_blue + ( (256-orig_blue) * percent ); if blue > 255 then blue=255; rgb=put(red,hex2.)||put(green,hex2.)||put(blue,hex2.); color="cx"||rgb; output; end; run; /* */ data anno_colors2; length function style color $10; retain xsys '3' ysys '3' when 'b' style 'solid'; orig_red= input('74',hex2.); orig_green=input('a9',hex2.); orig_blue= input('cf',hex2.); do i=100 to 50 by -2; count+1; function='move'; x=0; y=i; output; function='bar'; x=100; y=i-2; percent=(count-1)/(19); red=orig_red + ( (256-orig_red) * percent ); if red > 255 then red=255; green=orig_green + ( (256-orig_green) * percent ); if green > 255 then green=255; blue=orig_blue + ( (256-orig_blue) * percent ); if blue > 255 then blue=255; rgb=put(red,hex2.)||put(green,hex2.)||put(blue,hex2.); color="cx"||rgb; output; end; run; /* */ data anno_colors; set anno_colors1 anno_colors2; run; GOPTIONS DEVICE=png; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" style=minimal gtitle gfootnote ; goptions htitle=9pct htext=4pct; goptions ftitle="arial/bo" ftext="arial/bo"; goptions colors=(cx253494); pattern v=e image="ppop.gif" imagestyle=fit; title "'Patriot Popsicle' Sales"; footnote j=r "This example uses contrived data!"; pattern v=s c=cx045a8d; /* Screen-captured image from http://www.bombpop.com/ */ axis1 label=('Sales') minor=none; axis2 label=none; proc gchart data=mydata anno=anno_colors; vbar state / type=sum sumvar=value descending width=24 coutline=white raxis=axis1 maxis=axis2 html=htmlvar des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;