Hi everyone-
I'm having issues with my date values changing when I run a proc gplot or gchart.
Here is a simple example with output I dervied that illustrates the problem. My dates are only 1/1/2012 and 2/1/2012, yet when I graph it 1/3/2012, 1/13/2012, 1/23/2012, and 2/2/2012. Does anyone know why this is happening? I only want two dates showing, the only two in the data set 1/1/2012 and 2/1/2012 and ideally in the mmyyd7. format.
thank you!
data t2;
format breakout $15. ;
input breakout $ value date:mmddyy10.;
datalines;
group1 41 1/1/2012
group1 25 2/1/2012
group2 15 1/1/2012
group2 7 2/1/2012
group3 63 1/1/2012
group3 21 2/1/2012
group4 9 1/1/2012
group4 32 2/1/2012
;
run;
proc gchart data=t2;
format date mmddyy10.;
vbar3d date /sumvar=value subgroup=breakout
width=9
space=4
cframe=gray;
run;
quit;
GCHART is trying to bin your time data. Just use the DISCRETE option on the VBAR3D statement, and you'll get what you want.
Hope this helps!
Dan
GCHART is trying to bin your time data. Just use the DISCRETE option on the VBAR3D statement, and you'll get what you want.
Hope this helps!
Dan
That did it Dan!
Thanks a ton!
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.
Ready to level-up your skills? Choose your own adventure.