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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 391 views
  • 1 like
  • 2 in conversation