Dynamic auto refreshing charts

Reply
Occasional Contributor
Posts: 9

Dynamic auto refreshing charts

How to create a chart which changes dynamically over time?

I have created a CBEMA curve graph which plots the data of the Power Quality events in Base SAS.

My requirement is to show the plot of scattered data (i.e the events) on the graph as they occur dynamically.

I want the graph to be refreshed automatically,and fetch the data row wise incrementing it in a particular small time frame gap (in seconds) thereby changing the graph dynamically over time.

Super User
Super User
Posts: 7,392

Re: Dynamic auto refreshing charts

Sorry, what software are you talking about here, Base SAS, EG, Excel etc.  Also, what do you mean with dynamically over time, do you mean that the graph is, when its run, changed axis etc. or do you mean that it is run on Tuesday and new data arrives on Wednesday, and the report needs to be updated on Thursday?  They are two types of dynamic, dynamically generated by data at runtime, and dynamical as in each time you look at it the data used is changed (maybe not the best explanation).

For data generated output use macro code to conditionally build you Proc Template/Graph statements.

For graph which has change of input data over time, setup a scheduled batch job to run your graph program (note I don't have the other SAS kits such as EG, so there maybe other options for scheduling this).

Occasional Contributor
Posts: 9

Re: Dynamic auto refreshing charts

Thanks for the prompt response.

We are using Base SAS to code the graph.

We are receiving the data from a meter during runtime, which would be the actual application.

As of now I have created a dataset after pulling the data from an excel and I need to populate each data(call it an Event) in the form of events in the graph which would happen in a span of time interval(lets say 10 seconds). So I believe I would require a Chart Dynamically generated by Data at runtime.

Is there any sample code that I can refer from to populate the change on the graph whenever an event occurs?

Super User
Super User
Posts: 7,392

Re: Dynamic auto refreshing charts

Well, this blog has numerous examples of graphs and proc template.

http://blogs.sas.com/content/graphicallyspeaking/

Then there is the SAS docs on Graph Template Language:

SAS/GRAPH(R) 9.2: Graph Template Language Reference, Second Edition

http://www2.sas.com/proceedings/sugi31/262-31.pdf

And you may also want to look at the code which processes your data, maybe put it in a macro so you can change parameters quickly and easily.

Ask a Question
Discussion stats
  • 3 replies
  • 214 views
  • 3 likes
  • 2 in conversation