06-18-2014 04:00 AM
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.
06-18-2014 04:08 AM
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).
06-18-2014 04:27 AM
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?
06-18-2014 04:33 AM
Well, this blog has numerous examples of graphs and proc template.
Then there is the SAS docs on Graph Template Language:
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.