%let name=revenue; filename odsout '.'; data mydata; format revpct percent5.0; input source $ 1-10 revpct; cards; Mainframe .48 PC .29 UNIX .19 Other .04 ; run; data mydata; set mydata; length myhtml $500; myhtml='title='|| quote( 'Source: '||trim(left(source))||'0D'x|| 'Revenue: '||trim(left(put(revpct,percent5.0)))||' ' ); run; /* data anno_colors; 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.); function='move'; x=50; y=50; output; do i=0 to 100 by 2; count+1; function='pie'; rotate=360; size=(i/2.4); percent=(count-1)/(60); 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; proc sql; create table anno_colors as select * from anno_colors order by count descending; quit; run; */ /* Or, if you want the lightest color in the center */ data anno_colors; 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.); function='move'; x=50; y=50; output; do i=0 to 100 by 2; count+1; function='pie'; rotate=360; size=50-(i/2); percent=(count-1)/(60); 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; /* */ /* Adjust x & y pixels so your graph is to the proportions you like */ /* goptions xpixels=500 ypixels=610; */ goptions ftitle="arial" ftext="arial" htitle=7pct htext=4pct; goptions ctitle=cx084081 ctext=cx084081; GOPTIONS DEVICE=gif; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" style=minimal; goptions noborder; title h=7pct "Contribution to Revenue"; title2 h=7pct "by Platform"; footnote h=8pct " "; pattern1 value=psolid color=cx74a9cf repeat=4; proc gchart data=mydata; pie3d source / sumvar=revpct noheading explode='UNIX' value=none slice=outside anno=anno_colors coutline=white html=myhtml des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;