Help using Base SAS procedures

display amount in a barchart

Reply
Frequent Contributor
Posts: 127

display amount in a barchart

[ Edited ]

Dear experts,

 

I am trying to display the sum of the variables on a chart (inside=sum) but I do not get what I expect, attached the output and here the code

 

proc gchart data=mydata_plot;
vbar3d month / width=60
WOUTLINE=1
type=sum
sumvar=var_tot
inside=sum
subgroup=&var1.
legend=legend1
maxis=axis1
raxis=axis2
space=.4
/*annotate=barlabel*/
frame;

title "my data by &var1.";
run;
quit;

 

I can plot the data but I get the following warning: 

The VBAR/VBAR3D chart for month could not be labeled using INSIDE= because the labels are wider than the
bars.

 

Which is possible solution? Can I somehow display the value in the chart or could I at least print the table with the values under the table? In case yes... how? tahnks a lof in advance for your hints.

 

BRs, SH


plot.PNG
Super User
Super User
Posts: 7,398

Re: display amount in a barchart

Do you mean something like this:

http://blogs.sas.com/content/graphicallyspeaking/?s=datalabel+barchart

 

Get your total into a variable, then use datalabel options on one of the newer procedures to display it.  However it sounds like the value your trying to display in each of the bars is too wide to fit (i.e. it would wrap over the other bars).  Either size your bars up, or reduce font/size of text might help.

Ask a Question
Discussion stats
  • 1 reply
  • 150 views
  • 0 likes
  • 2 in conversation