Hi,
I am using Proc GChart to display some graphical bars.. in my table I have dates for 14 days but the graph is displaying just random dates and the associated data.
as an example, I have dates from June 26 2012 to July 9 2012 but graph is showing only 26 June, 29 June 2 July 5 July and 8 July
here is my data
CATEGORY | DAY_DATE | VOLUME |
COM_1 | 26Jun2012 | 165,568 |
COM_1 | 27Jun2012 | 134,287 |
COM_1 | 28Jun2012 | 198,094 |
COM_1 | 29Jun2012 | 197,668 |
COM_1 | 30Jun2012 | 142,697 |
COM_1 | 01Jul2012 | 157,581 |
COM_1 | 02Jul2012 | 196,513 |
COM_1 | 03Jul2012 | 174,259 |
COM_1 | 04Jul2012 | 102,094 |
COM_1 | 05Jul2012 | 105,536 |
COM_1 | 06Jul2012 | 93,170 |
COM_1 | 07Jul2012 | 129,333 |
COM_1 | 08Jul2012 | 138,129 |
COM_1 | 09Jul2012 | 148,199 |
Here is the code that I am using
axis1 minor=none label=('Volumes');
axis2 minor=none label=(f='Arial/Bold' justify=centre 'Days')
value = (font="Arial" height = 8pt);
title1 'Title1';
PROC GCHART DATA=WORK.TABLE;
VBAR3D
DAY_DATE
/
SUMVAR=VOLUME
SHAPE=Cylinder
FRAME TYPE=SUM
SUM
LEGEND=LEGEND1
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
PATTERNID=MIDPOINT
LREF=1
CREF=BLACK
AUTOREF
space=0
;
BY CATEGORY;
RUN; QUIT;
Please advice
Thanks
to put "Discrete" Option in the statement of VBAR3D, try it
PROC GCHART DATA=have;
VBAR3D
DAY_DATE / discrete SUMVAR=VOLUME SHAPE=Cylinder
FRAME TYPE=SUM SUM
LEGEND=LEGEND1
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
PATTERNID=MIDPOINT
LREF=1
CREF=BLACK
AUTOREF
space=0
;
RUN; QUIT;
to put "Discrete" Option in the statement of VBAR3D, try it
PROC GCHART DATA=have;
VBAR3D
DAY_DATE / discrete SUMVAR=VOLUME SHAPE=Cylinder
FRAME TYPE=SUM SUM
LEGEND=LEGEND1
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
PATTERNID=MIDPOINT
LREF=1
CREF=BLACK
AUTOREF
space=0
;
RUN; QUIT;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.