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

Hi,

I can't find the option to have the gridlines over my bars,

not under but on top of them.

I use sgrender with gtl like this :

* style template;

proc template;

  define style styles.alertlevels;

  parent=wivisp_sasstyle;

  style GraphColors from GraphColors /

  'gdata1' = CXD6E1F1

  'gdata2' = CXDEBEAD

  'gdata3' = CXE59C69

  'gdata4' = CXED7925

  ;

  class graphgridlines  / contrastcolor=colors('wivisp3') color=red ;

  end;

run;

* graph template;

proc template;

  title;footnote;

  define statgraph ALbarchart;

  dynamic latin source;

  begingraph / border=false;

  entrytitle "Early warning index";

  entrytitle latin;

  entryfootnote "© WIV-ISP – Data Source:" source;

  layout overlay /

  yaxisopts=(label='Cases / week'

  griddisplay=on

  display=(label tickvalues))

  xaxisopts=(label='week'

  griddisplay=off

  display=(label tickvalues ticks));

  barchart x=Date y=Cases /

  group=AlertLevel

  index=index

  barwidth=.8

  name='zut'

  outlineattrs=(thickness=0 color=white)

  datatransparency=0

  legendlabel='Alert Level'

  grouporder=ascending;

  discretelegend 'zut'/

  border=false

  title='Alert Level';

  endlayout;

  endgraph;

  end;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

There is no option in GTL to place grid lines on top of the plots.  Grids always go behind the plots.

But, you have two other ways to do this.  You can make the bar chart a bit transparent.  Or, instead of turning on gridlines, draw reference lines at each major tick value on the appropriate axis.  You can use LINEATTRS=GRAPHGRIDS to get the same visual properties.

View solution in original post

2 REPLIES 2
ballardw
Super User

You might want to try using the REFERENCELINE statement.

Jay54
Meteorite | Level 14

There is no option in GTL to place grid lines on top of the plots.  Grids always go behind the plots.

But, you have two other ways to do this.  You can make the bar chart a bit transparent.  Or, instead of turning on gridlines, draw reference lines at each major tick value on the appropriate axis.  You can use LINEATTRS=GRAPHGRIDS to get the same visual properties.

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
  • 2 replies
  • 1115 views
  • 3 likes
  • 3 in conversation