Hi Robert, I hope it's OK to ask a follow-up question. Suppose I also have a true stacked vbar, as in the example below. You mentioned previously I need to modify the data bit in such cases. Could you please clarify whether I should split up the data (stock) into two separate variables (IBM and Intel) and then treat the problem exactly as in my previous question? Or is there another method? Following is my current code and output, where I would like to display the values for all of the green segments. data test;
set sashelp.stocks (where= (year(date)=2005));
if stock IN ("Intel","IBM");
shares=int(volume/100000);
if stock="IBM" then shares=int(shares/3);
run;
proc sgplot noborder data=test;
vbar date /response=shares seglabelattrs=(size=6pt)
group=stock seglabel GROUPORDER=ascending nooutline;
styleattrs datacolors=(BIGY VPAPB) ;
xaxis fitpolicy=thin display=(nolabel)
valueattrs=(size=7 color=black Family=Arial);
yaxis grid display=(nolabel)
valueattrs=(size=7 color=black Family=Arial) valueshint min=0 offsetmax=0 fitpolicy=thin;
keylegend "VBAR" / title="" location=outside position=bottom noborder
valueattrs=(size=8) SORTORDER= descending noopaque autooutline;
format date monyy. shares 4.0;
run; Thanks!
... View more