How to format a proc gchart?

Accepted Solution Solved
Reply
Super Contributor
Posts: 303
Accepted Solution

How to format a proc gchart?

I used th code below but the format is not working

proc format;

value $type

chem_dru = 'Chemo Drug Cost'

chem_lab='Chemo lab cost'

MD_visit='MD visit cost'

;

run;

  /* Generate detail pie chart */

proc gchart data=result.pie3;

  pie type / sumvar=cost type=sum ;

  format type $type.;

run;

quit


Accepted Solutions
Solution
‎05-22-2013 11:42 PM
Super User
Posts: 19,822

Re: How to format a proc gchart?

Posted in reply to desireatem

The code looks correct, so what's probably wrong is that your text is either 1) not the exact same case as in your format, eg. Md_Visit vs MD_visit

or 2) you have trailing spaces in the name. You can remove trailing spaces using trim() function. 

View solution in original post


All Replies
Solution
‎05-22-2013 11:42 PM
Super User
Posts: 19,822

Re: How to format a proc gchart?

Posted in reply to desireatem

The code looks correct, so what's probably wrong is that your text is either 1) not the exact same case as in your format, eg. Md_Visit vs MD_visit

or 2) you have trailing spaces in the name. You can remove trailing spaces using trim() function. 

Super Contributor
Posts: 303

Re: How to format a proc gchart?

Posted in reply to desireatem

THanks, I fixed it base on your statement. Thanks.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 146 views
  • 0 likes
  • 2 in conversation