I am new to SAS as an undergraduate student. After an hour or so of trying variations of code that I searched here on SAS Support, I cannot get any of them to work to change the colors on my 100% Stacked Bar Chart. Can somebody please help? Here is the code that we were provided to use for the chart.
proc freq data=project.studentdrink;
table dalc*studytime/out=freq outpct;
quit;
proc sgplot data=freq pctlevel=group;
vbar Dalc /
response=studytime
group=studytime
datalabel seglabel seglabelattrs=(size=8) stat=percent;
title '100% Stacked Bar Chart for Student Workday Alcohol Consumption by Study Time (n=395)';
yaxis label = 'Workday Alcohol Consumption by Study Time';
run;
fillattrs works within the code when I try it, although I have only been able to change it to one solid color and I need multiple colors if that's possible. Thank you.