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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1310 views
  • 3 likes
  • 3 in conversation