The SAS Output Delivery System and reporting techniques

Eliminate second node of pie chart in ods pdf

Reply
Contributor
Posts: 49

Eliminate second node of pie chart in ods pdf

Hi,

I posted a similar question before, the feedback are valuable. But I still don't get the right answer I want, this time I am more focus on getting rid of the second node of the pie chart, which is "pie chart of group" for my data. Please let me know if this is workable in SAS. Thanks! Below is my data and code.

data mydata;
input group $ count percent;
datalines;
A 20 .2
B 30 .3
C 50 .5
;
run;

ods pdf file='H:\report.pdf';
PROC GCHART DATA=mydata;
PIE group / sumvar=count ;
RUN;
ods pdf close;
SAS Super FREQ
Posts: 8,864

Re: Eliminate second node of pie chart in ods pdf

Posted in reply to lueryy2000
Hi:
Usually PROC GCHART needs a QUIT statement after the RUN statement. Does your PDF file contain any output???? Or, did you post incomplete code?

cynthia
Valued Guide
Posts: 634

Re: Eliminate second node of pie chart in ods pdf

Posted in reply to lueryy2000
What exactly do you not want to accomplish? Do you need to exclude GROUP='B' from the chart?
Contributor
Posts: 49

Re: Eliminate second node of pie chart in ods pdf

Sorry to confuse. ods pdf generated two bookmarks for proc gchart here, the first node is "The Gchart Procedure", and the second is "pie chart of group". I just want to keep the first one and eliminate the second one. Thanks.
Lu
SAS Super FREQ
Posts: 8,864

Re: Eliminate second node of pie chart in ods pdf

Posted in reply to lueryy2000
Hi:
As indicated in my previous response, your choices are to:
1) use ODS PROCLABEL to alter the default text or blank out the text for the top level node
2) use DESCRIPTION to alter the default text or blank out the txt for the second level node
(Neither of these options will eliminate the node completely)
OR
3) use ODS DOCUMENT to rearrange the structure of the bookmarks, so there is only 1 bookmark for each graph.

SAS/GRAPH works a bit differently with bookmarks than tabular output. So the only way to eliminate nodes completely, would be to use ODS DOCUMENT. However, I believe that there is one node in ODS DOCUMENT for SAS/GRAPH that you cannot change -- and I think it is the second level node. So, you might be able to get rid of the top level node in the ODS DOCUMENT, but you would still have the second level node with the original name, when you replayed. This would at least give you one node per graph.

You may want to work with Tech Support on this question, because this is going to require that they look at ALL your code and help you come up with a solution that's satisfactory, if possible. If for example, you were putting 2 graphs on 1 page and only wanted to have 1 bookmark node per "page", I do not believe that you could eliminate the second level nodes for the graph output.

To open a track with Tech Support, open a track by filling out this form:
http://support.sas.com/ctx/supportform/createForm

cynthia
Contributor
Posts: 49

Re: Eliminate second node of pie chart in ods pdf

Posted in reply to Cynthia_sas
Thank you for your thorough explanation. As you said, I tried ods document and got no idea how to get rid of the second node for the pie chart. I might contact sas tech to see if they can help.

Thanks again!
Lu
SAS Super FREQ
Posts: 8,864

Re: Eliminate second node of pie chart in ods pdf

Posted in reply to lueryy2000
As I explained, you may have to live with getting rid of the top node and keeping the second node. But Tech Support is probably your best resource on this question.

cynthia
Ask a Question
Discussion stats
  • 6 replies
  • 191 views
  • 0 likes
  • 3 in conversation