<?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 Re: Auto refreshing charts based on each iteration of a loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151708#M262525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure I understand exactly what you're wanting, but here are a couple of possibilities:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know all the 7 events ahead of time, I guess you could create a gif animation, with 5 second delay between each frame. There are several examples of animated gif graphs on this page:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A class="active_link" href="http://www.robslink.com/SAS/democd27/aaaindex.htm" style="font-size: 10pt; line-height: 1.5em;" title="http://www.robslink.com/SAS/democd27/aaaindex.htm"&gt;Robert Allison's SAS/Graph Samples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, if the data you're wanting to plot is happening 'live' (ie, you don't have all the data ahead of time), and you're wanting a graph to 'refresh' itself every 5 seconds, you could possibly do that with SAS/Intrnet. With SAS/Intrnet, it generates the graph on-the-fly when you go to the url. The graph can be set up to read the latest/greatest data whenever it is run. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one SAS/Intrnet example that queries the time, and draws a representation of a clock every time it's run. I set it up to refresh itself every 5 seconds using the following code after my proc gchart (this is just a portion - not the entire sas/intrnet job) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=a;&lt;/P&gt;&lt;P&gt;pie category / sumvar=seconds clockwise noheading&lt;/P&gt;&lt;P&gt; coutline=blue slice=none &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;des='';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;See the following webpage for info about 'refresh' ...&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://webdesign.about.com/cs/metatags/a/aa080300a.htm"&gt;http://webdesign.about.com/cs/metatags/a/aa080300a.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;%let refresh=5;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; file _webout;&lt;/P&gt;&lt;P&gt; put "&amp;lt;meta http-equiv='refresh' content='&amp;amp;refresh'&amp;gt;";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2015 19:38:04 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2015-01-20T19:38:04Z</dc:date>
    <item>
      <title>Auto refreshing charts based on each iteration of a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151706#M262523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to create a dynamic chart where the graph is refreshed in between short time intervals of say 5 seconds with different events plotted on the chart.&lt;/P&gt;&lt;P&gt;I have created a macro that creates a separate dataset for each event and within the macro have provided the plot graph function. So for each iteration(i.e each event) there will be a graph created.&lt;BR /&gt;Below is the described code I have created in Base SAS.But I am getting say 7 graphs for 7 events on the same page,wherein I want only a single graph to refresh every 5 seconds with the latest iterated event. &lt;BR /&gt;Any help for the code change below will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; proc sql noprint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select count(distinct Event)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into :n&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from Utildem.CbemaLabel;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select distinct Event&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into :Event1 - :Event%left(&amp;amp;n)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from Utildem.CbemaLabel;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%macro makeds;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; %do i=1 %to &amp;amp;n;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data &amp;amp;&amp;amp;Event&amp;amp;i (drop=Event);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.cbema;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Event="&amp;amp;&amp;amp;Event&amp;amp;i";&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; proc gplot data=&amp;amp;&amp;amp;Event&amp;amp;i ; &lt;BR /&gt;plot magnitude*duration / annotate = annocbema haxis = axis1 vaxis = axis2 html=tips1;&lt;BR /&gt;plot2 magnitude*incident / &lt;BR /&gt;haxis = axis1 vaxis = axis2 html=tips1/*noframe*/&lt;BR /&gt; autovref cvref=graydd &lt;BR /&gt; autohref chref=graydd &lt;BR /&gt; des="" name="&amp;amp;name" ;&lt;BR /&gt; &lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;/*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;*/&lt;BR /&gt;slept= sleep(5);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; %end;&lt;BR /&gt;%mend makeds;&lt;BR /&gt;%makeds;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 07:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151706#M262523</guid>
      <dc:creator>Jeema</dc:creator>
      <dc:date>2014-06-23T07:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Auto refreshing charts based on each iteration of a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151707#M262524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I am not following your question: " I want only a single graph to refresh every 5 seconds with the latest iterated event".&amp;nbsp; Graphs are output, there is no 'refresh', you would need to run the program again.&amp;nbsp; Maybe you want to output each graph to a separate file, e.g. graph_output_time_0, graph_output_time_5, ...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151707#M262524</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-06-23T08:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Auto refreshing charts based on each iteration of a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151708#M262525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure I understand exactly what you're wanting, but here are a couple of possibilities:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know all the 7 events ahead of time, I guess you could create a gif animation, with 5 second delay between each frame. There are several examples of animated gif graphs on this page:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A class="active_link" href="http://www.robslink.com/SAS/democd27/aaaindex.htm" style="font-size: 10pt; line-height: 1.5em;" title="http://www.robslink.com/SAS/democd27/aaaindex.htm"&gt;Robert Allison's SAS/Graph Samples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, if the data you're wanting to plot is happening 'live' (ie, you don't have all the data ahead of time), and you're wanting a graph to 'refresh' itself every 5 seconds, you could possibly do that with SAS/Intrnet. With SAS/Intrnet, it generates the graph on-the-fly when you go to the url. The graph can be set up to read the latest/greatest data whenever it is run. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one SAS/Intrnet example that queries the time, and draws a representation of a clock every time it's run. I set it up to refresh itself every 5 seconds using the following code after my proc gchart (this is just a portion - not the entire sas/intrnet job) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=a;&lt;/P&gt;&lt;P&gt;pie category / sumvar=seconds clockwise noheading&lt;/P&gt;&lt;P&gt; coutline=blue slice=none &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;des='';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;See the following webpage for info about 'refresh' ...&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://webdesign.about.com/cs/metatags/a/aa080300a.htm"&gt;http://webdesign.about.com/cs/metatags/a/aa080300a.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;%let refresh=5;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; file _webout;&lt;/P&gt;&lt;P&gt; put "&amp;lt;meta http-equiv='refresh' content='&amp;amp;refresh'&amp;gt;";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 19:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-refreshing-charts-based-on-each-iteration-of-a-loop/m-p/151708#M262525</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2015-01-20T19:38:04Z</dc:date>
    </item>
  </channel>
</rss>

