Hi,
I'd like to produce a horizontal bar chart with percents displayed inside the bar segments. Can I do it with GTL? My code is below.
Thanks,
Randy
data testData;
length var $ 3;
var='A11'; val=68; seg='Positive'; output;
var='A11'; val=14; seg='Neutral'; output;
var='A11'; val=18; seg='Negative'; output;
var='A4'; val=77; seg='Positive'; output;
var='A4'; val=11; seg='Neutral'; output;
var='A4'; val=12; seg='Negative'; output;
var='A3'; val=85; seg='Positive'; output;
var='A3'; val=7; seg='Neutral'; output;
var='A3'; val=8; seg='Negative'; output;
var='A1'; val=85; seg='Positive'; output;
var='A1'; val=6; seg='Neutral'; output;
var='A1'; val=9; seg='Negative'; output;
run;
ods graphics / reset;
ods listing close;
ods html file='test.html' path='c:\temp' style=Science;
proc template;
define statgraph barchartparm;
begingraph / border=false;
layout overlay / xaxisopts=(display=none) yaxisopts=(display=none) WALLDISPLAY=NONE;
barchartparm x=var y=val / group=seg orient=horizontal;
*entry "Test line";
endlayout;
endgraph;
end;
run;
proc sgrender data=testData template=barchartparm;
run;
ods listing;
ods html close;