05-13-2015 11:03 AM
Yesterday, I wrote a program in Base SAS and output different charts using PROC GCHART...
The first chart output to ODS RTF perfectly; however, the second chart did NOT... (see attached output)
Also, all labels appear in the WORK.GSEG.GCHART folder...
Any thoughts/suggestions/missing elements/blatant errors??? Caveat, I am VERY new at using SAS/GRAPH... So, I'm sure there is something I don't realize about VBAR3D
05-13-2015 11:27 AM
Proc Gchart (and Gplot and some of the other G procedures) have the ability to create more than one chart type per procedure call. The procedure ends with a QUIT; statement. Since the procedure had not completed when encountering the RTF Close then the correct output wasn't sent to the ODS RTF destination.
HINT: note that except for title and no labels the second chart is the same as the first so PERCENT wasn't actually run.
05-13-2015 11:38 AM
Great info! Thank you very much for a quick response. Would you mind showing me the proper way to write this in Base SAS so that my RTF output will be correct?
05-13-2015 01:14 PM
Add Quit; after the second Run; should be all you need.
You could also have only one Proc Gchart statement with the two plots within the procedure call. That is how Gchart creates additional charts with different variables, statistics etc.
05-13-2015 01:51 PM
Tried it...same result.
I think the issue has to do with the bar width as it relates to the default font size for PROC GCHART - VBAR3D... I don't think it has enough room to put the percent value over the top of the bars...
Any programming thoughts from that angle?
05-13-2015 03:34 PM
I usually don't let Gchart do the summaries because of odd behaviors. If I have my variable I can assign a format and such for appearance control of displayed text.
If it looks like you are getting a percent result, the left axis should change appearance, then working with options such as WIDTH to make wider bars, and possibly making the whole graph wider (Axis control to rotate vertical axis text for example) might give more space to display the value.