Hi,
I've got the following SAS code creating a graph for me:
proc gchart data=output.monthcount2;
vbar strmonth1/
group=yr
subgroup=txnid
sumvar=_FREQ_
name='outiswk'
maxis=axis1;
label _FREQ_ = 'Transactions';
format txnid $txnname.;
format strmonth1 $smon.;
run;
The months are being selected by a user from a web page, so you can't guarentee which ones they will choose, but they can only choose a start and an end month, and the stats are generated for all those months between.
My problem is that this graph is ordering the months alphabetically once the $smon format function has been performed (it changes the string value of the month into a 3 char description, e.g. '1' = 'Jan', '2' = 'Feb' etc). The only way I can find round it is to change the month descriprions to '01Jan', '02Feb' etc, but this looks poor, plus people may be confused the column means 1st Jan, 2nd Feb etc.
Is there any way to order the columns by the month numerical value, before that value becomes formatted?
As I say, not all 12 months will be chosen.
Thanks very much,
Steve
I've got the following SAS code creating a graph for me:
proc gchart data=output.monthcount2;
vbar strmonth1/
group=yr
subgroup=txnid
sumvar=_FREQ_
name='outiswk'
maxis=axis1;
label _FREQ_ = 'Transactions';
format txnid $txnname.;
format strmonth1 $smon.;
run;
The months are being selected by a user from a web page, so you can't guarentee which ones they will choose, but they can only choose a start and an end month, and the stats are generated for all those months between.
My problem is that this graph is ordering the months alphabetically once the $smon format function has been performed (it changes the string value of the month into a 3 char description, e.g. '1' = 'Jan', '2' = 'Feb' etc). The only way I can find round it is to change the month descriprions to '01Jan', '02Feb' etc, but this looks poor, plus people may be confused the column means 1st Jan, 2nd Feb etc.
Is there any way to order the columns by the month numerical value, before that value becomes formatted?
As I say, not all 12 months will be chosen.
Thanks very much,
Steve