Formats will help here! You'll want to create a format and informat as follows:
proc format;
invalue invqrtl 'First Quartile' = 1
'Second Quartile' = 2
'Third Quartile' = 3
'Fourth Quartile' = 4; value qrtl 1='First Quartile'
2='Second Quartile'
3='Third Quartile'
4='Fourth Quartile';
run;
The informat will allow you to convert your character variable Quartiles into a numeric variable Quartiles_num which you'll use for the graph. Since it's numeric, the plot will automatically order these in the right order (1,2,3,4) and you'll apply format qrtl. to display these as "First Quartile", "Second Quartile",...
The code you'll want to include in a data step to prep the data is as follows:
data ....;
.....;
Quartiles_num=input(Quartiles,invqrtl.);
format Quartiles_num qrtl.;
....;
run;
The only change to your PROC SGPLOT is to use Quartiles_num instead of Quartiles.
... View more