- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
This is my today's problem, I am creating a PIE3D that i want with all slices exploded, i wanted to display some of my text labels on two lines so I used the special caracter "0A"x to do it and it works.
But when I want to explode the slices with the "two lines" tex labels it dosn't work.
I have joined the sas data and this is my Gchart procedure :
ODS RTF FILE="d:\test\test3.doc" ;
GOPTION DEVICE=ACTXIMG VSIZE=25CM HSIZE=20CM ;
PROC GCHART DATA=freq ;
PIE3D ltypologie /sumvar=percent noheading discrete
explode="Acte d'AMP" "Autres" "Stimulation ovarienne" "Structure"
clockwise angle=120 RADIUS=40 other=0 ;
FORMAT percent pct_rd.;
RUN ; QUIT ;
GOPTION RESET=ALL ;
ODS RTF CLOSE ;
So the two slices who don't want to be exploded are :
Erreur d'attribution/identification and
Perte de gamètes/embryons
Thanks a lot for your help
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
One solution would be to assign simple numeric values for each pie slice, and then it's easy to "explode" those numeric slice names. Then create a user-defined format (data-driven) so that those numbers print as the desired text...
libname mydata '.';
ODS RTF FILE="pie.doc";
GOPTION DEVICE=ACTXIMG VSIZE=25CM HSIZE=20CM;
/* create numbers for each pie slice */
data tempdata; set mydata.freq;
slicenum=_n_;
run;
/* create user-defined format so those numbers show up as the desired text */
data control; set tempdata (rename = ( slicenum=start ltypologie=label));
fmtname = 'piefmt';
type = 'N';
end = START;
run;
proc format lib=work cntlin=control;
run;
PROC GCHART DATA=tempdata;
format slicenum piefmt.;
/* FORMAT percent pct_rd.; */
PIE3D slicenum /
sumvar=percent
noheading
discrete
explode=1 2 3 4 5 6
clockwise
angle=120
RADIUS=40
other=0;
RUN; QUIT;
ODS RTF CLOSE;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do you specifically want to use device=actximg, and Proc Gchart?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
not really Robert, I used actximg so I can use "0A"x in my text labels and display them in two lines on the graph
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
One solution would be to assign simple numeric values for each pie slice, and then it's easy to "explode" those numeric slice names. Then create a user-defined format (data-driven) so that those numbers print as the desired text...
libname mydata '.';
ODS RTF FILE="pie.doc";
GOPTION DEVICE=ACTXIMG VSIZE=25CM HSIZE=20CM;
/* create numbers for each pie slice */
data tempdata; set mydata.freq;
slicenum=_n_;
run;
/* create user-defined format so those numbers show up as the desired text */
data control; set tempdata (rename = ( slicenum=start ltypologie=label));
fmtname = 'piefmt';
type = 'N';
end = START;
run;
proc format lib=work cntlin=control;
run;
PROC GCHART DATA=tempdata;
format slicenum piefmt.;
/* FORMAT percent pct_rd.; */
PIE3D slicenum /
sumvar=percent
noheading
discrete
explode=1 2 3 4 5 6
clockwise
angle=120
RADIUS=40
other=0;
RUN; QUIT;
ODS RTF CLOSE;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Robert, it works ![]()