<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GTL template defining axis as integers in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244483#M8861</link>
    <description>&lt;P&gt;I have a Macro template for my graphs:&lt;/P&gt;
&lt;P&gt;/*Generic GTL template for line graphs*/&lt;BR /&gt;%Macro CreateTemplate(statGraphName, yaxisOption, groupText, dataLabelText, rollNameText, /*linecolor,*/ yColumn);&lt;BR /&gt; /*color campus line graphs*/&lt;BR /&gt; %let colorline = %str(lineattrs = (pattern =1 thickness = 1));&lt;BR /&gt; %let colorsymbol = %str();&lt;/P&gt;
&lt;P&gt;/*template*/&lt;BR /&gt; proc template; &lt;BR /&gt; define statgraph &amp;amp;statGraphName;&lt;BR /&gt; dynamic TITLE1 TITLE2;&lt;BR /&gt; begingraph;&lt;BR /&gt; entrytitle halign=left TITLE1;&lt;BR /&gt; entrytitle TITLE2;&lt;BR /&gt; layout overlay / xaxisopts =(label = ' ') &amp;amp;yaxisOption walldisplay=(fill);&lt;BR /&gt; seriesplot x=Fiscal_Year y=&amp;amp;yColumn / group=&amp;amp;groupText name='a' index=index display=all datalabel=&amp;amp;dataLabelText &lt;BR /&gt; &amp;amp;colorline &amp;amp;colorsymbol&lt;BR /&gt; &amp;amp;rollNameText; &lt;BR /&gt; endlayout;&lt;BR /&gt; endgraph;&lt;BR /&gt; end;&lt;BR /&gt; run;&lt;BR /&gt;%Mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it is called with the following code:&lt;/P&gt;
&lt;P&gt;%CreateTemplate(ProposalsDollarTemplate, %str(yaxisopts =(label = ' ' linearopts=(viewmin=0))), none, none, &lt;BR /&gt; %str(ROLENAME=(Year=Fiscal_Year)&lt;BR /&gt; TIP=(Year Y ) tiplabel=(Year="Fiscal Year" Y="# Proposals" )), _FREQ_);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*display graph*/&lt;BR /&gt; proc sgrender data= ProposalsCombinedSummary template=ProposalsDollarTemplate;&lt;BR /&gt; dynamic title2="# of &amp;amp;currentOrg Proposals Submitted-Fiscal YTD";&lt;BR /&gt; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently my graph is showing the x axis with decimal values (see image), and I want to display intergers only. Is there an easy option to add to my template to specifiy interger values? The actual values on the x axis will change, so I don't want any hard-coded values.&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1496i1E34ADC73E306ABB/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="graph.png" title="graph.png" /&gt;i&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2016 17:00:34 GMT</pubDate>
    <dc:creator>olsengf</dc:creator>
    <dc:date>2016-01-19T17:00:34Z</dc:date>
    <item>
      <title>GTL template defining axis as integers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244483#M8861</link>
      <description>&lt;P&gt;I have a Macro template for my graphs:&lt;/P&gt;
&lt;P&gt;/*Generic GTL template for line graphs*/&lt;BR /&gt;%Macro CreateTemplate(statGraphName, yaxisOption, groupText, dataLabelText, rollNameText, /*linecolor,*/ yColumn);&lt;BR /&gt; /*color campus line graphs*/&lt;BR /&gt; %let colorline = %str(lineattrs = (pattern =1 thickness = 1));&lt;BR /&gt; %let colorsymbol = %str();&lt;/P&gt;
&lt;P&gt;/*template*/&lt;BR /&gt; proc template; &lt;BR /&gt; define statgraph &amp;amp;statGraphName;&lt;BR /&gt; dynamic TITLE1 TITLE2;&lt;BR /&gt; begingraph;&lt;BR /&gt; entrytitle halign=left TITLE1;&lt;BR /&gt; entrytitle TITLE2;&lt;BR /&gt; layout overlay / xaxisopts =(label = ' ') &amp;amp;yaxisOption walldisplay=(fill);&lt;BR /&gt; seriesplot x=Fiscal_Year y=&amp;amp;yColumn / group=&amp;amp;groupText name='a' index=index display=all datalabel=&amp;amp;dataLabelText &lt;BR /&gt; &amp;amp;colorline &amp;amp;colorsymbol&lt;BR /&gt; &amp;amp;rollNameText; &lt;BR /&gt; endlayout;&lt;BR /&gt; endgraph;&lt;BR /&gt; end;&lt;BR /&gt; run;&lt;BR /&gt;%Mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it is called with the following code:&lt;/P&gt;
&lt;P&gt;%CreateTemplate(ProposalsDollarTemplate, %str(yaxisopts =(label = ' ' linearopts=(viewmin=0))), none, none, &lt;BR /&gt; %str(ROLENAME=(Year=Fiscal_Year)&lt;BR /&gt; TIP=(Year Y ) tiplabel=(Year="Fiscal Year" Y="# Proposals" )), _FREQ_);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*display graph*/&lt;BR /&gt; proc sgrender data= ProposalsCombinedSummary template=ProposalsDollarTemplate;&lt;BR /&gt; dynamic title2="# of &amp;amp;currentOrg Proposals Submitted-Fiscal YTD";&lt;BR /&gt; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently my graph is showing the x axis with decimal values (see image), and I want to display intergers only. Is there an easy option to add to my template to specifiy interger values? The actual values on the x axis will change, so I don't want any hard-coded values.&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1496i1E34ADC73E306ABB/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="graph.png" title="graph.png" /&gt;i&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 17:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244483#M8861</guid>
      <dc:creator>olsengf</dc:creator>
      <dc:date>2016-01-19T17:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: GTL template defining axis as integers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244490#M8862</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure I undertand. &amp;nbsp;Why do you have all the macro code there? &amp;nbsp;Why not just use the flexibility of dynamic variables, and conditional logic in the template. &amp;nbsp;As for your axis, why not just take round min - round max plus some window (maybe 10% of the range between min/max), again use a dynamic variable:&lt;BR /&gt;&lt;SPAN&gt;proc sgrender data= ProposalsCombinedSummary template=ProposalsDollarTemplate;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; dynamic title2="# of &amp;amp;currentOrg Proposals Submitted-Fiscal YTD"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; range_low=&amp;amp;min. range_high=&amp;amp;max. range_window=&amp;amp;window.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 17:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244490#M8862</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-19T17:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: GTL template defining axis as integers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244503#M8864</link>
      <description>&lt;P&gt;In the LINEAROPTS of the axis options, there is an option called INTEGER=true | false that does just what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 18:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244503#M8864</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-01-19T18:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: GTL template defining axis as integers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244504#M8865</link>
      <description>&lt;P&gt;Thank you! This worked perfectly!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 18:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-template-defining-axis-as-integers/m-p/244504#M8865</guid>
      <dc:creator>olsengf</dc:creator>
      <dc:date>2016-01-19T18:12:49Z</dc:date>
    </item>
  </channel>
</rss>

