BookmarkSubscribeRSS Feed
Jeema
Calcite | Level 5

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.

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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).

Jeema
Calcite | Level 5

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?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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