BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mimipin
Calcite | Level 5

Trying to insert a pie chart along with a table from proc report. I am using ODS Layout. My pie chart has distorted colors - it is good in the gchart results window but not in the PDF.

Thanks in advance.

Below is the relevant section for this chart:

ods region x=3.501in y=2in width=3.999in height=1.75in ; 

goptions reset=all cback=white hsize=3.5in vsize=1.75in;

proc gchart data=&rxds1(where = (cnt = &i.));

   pie lob / sumvar=mat

               noheading

               slice=none

               value=none

               coutline=BL

               matchcolor

               other=0

               legend=legend1

               midpoints="COMMERCIAL" "MEDICARE D"  "MEDICAID" "CASH"

   ;

   legend1 label=none position=(right middle) across=1 shape=bar(3,2);

   pattern1 color=green ;

   pattern2 color=yellow ;

   pattern3 color=blue ;

   pattern4 color=red ;

run;

quit;


piechart.png
1 ACCEPTED SOLUTION

Accepted Solutions
DanO_sas_com
SAS Employee

This is a defect in SAS 9.3 that has been addressed in SAS 9.4.  Unfortunately at this time I do not see a workaround.

View solution in original post

4 REPLIES 4
ballardw
Super User

How are you getting it into PDF? You don't show any related code.

mimipin
Calcite | Level 5

Ballardw: thanks for the response - it is part of a longer, but I am adding the related PDF code:

options orientation=portrait papersize=letter nodate nonumber leftmargin=0.5in rightmargin=0.5in topmargin=.001in bottommargin=.001in;

ods escapechar='^';

title;

footnote;

ods pdf file="C:\.......\Output\clyot&i..pdf" notoc;

ods layout start width=8in height=10.9in columns=2;

ods region x=1in y=2in width=2.5in height=1.75in;

Proc Report Data=lob_ord (where = (cnt = &i.)) nowd headline

************

run;

ods region x=3.501in y=2in width=3.999in height=1.75in ;

goptions reset=all cback=white hsize=3.5in vsize=1.75in;

proc gchart data=&rxds1(where = (cnt = &i.));

   pie lob / sumvar=mat

               noheading

               slice=none

               value=none

               coutline=BL

               matchcolor

               other=0

               legend=legend1

               midpoints="COMMERCIAL" "MEDICARE D"  "MEDICAID" "CASH"   ;

   legend1 label=none position=(right middle) across=1 shape=bar(3,2);

   pattern1 color=green ;

   pattern2 color=yellow ;

   pattern3 color=blue ;

   pattern4 color=red ;

run;

quit;

ods region x=1in y=4in width=8in height=6.5in column_span=2;

........

DanO_sas_com
SAS Employee

This is a defect in SAS 9.3 that has been addressed in SAS 9.4.  Unfortunately at this time I do not see a workaround.

mimipin
Calcite | Level 5

Thanks for your response Dan. Much appreciated!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 991 views
  • 0 likes
  • 3 in conversation