BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tparvaiz
Obsidian | Level 7

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

CATEGORYDAY_DATEVOLUME
COM_126Jun2012165,568
COM_127Jun2012134,287
COM_128Jun2012198,094
COM_129Jun2012197,668
COM_130Jun2012142,697
COM_101Jul2012157,581
COM_102Jul2012196,513
COM_103Jul2012174,259
COM_104Jul2012102,094
COM_105Jul2012105,536
COM_106Jul201293,170
COM_107Jul2012129,333
COM_108Jul2012138,129
COM_109Jul2012148,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

1 ACCEPTED SOLUTION

Accepted Solutions
QLi
Fluorite | Level 6 QLi
Fluorite | Level 6

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;

View solution in original post

1 REPLY 1
QLi
Fluorite | Level 6 QLi
Fluorite | Level 6

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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 373 views
  • 1 like
  • 2 in conversation