tags:

views:

378

answers:

4

I have some data and I want to plot a graph using that data. The problem is that the data keeps on changing (multiple files) and I want the graph to be continuous (something like ECG). Can anyone help me with the ideas?

A: 

This type of graph is usually called a Histogram (similar to your CPU usage chart) that keeps on scrolling.

You just need to update a chart periodically with the last x number of points along the timeline.

Are you looking for something specific, eg components to use etc? Some info about technologies would help.

Mark Redman
A: 

You could use jQuery (other JS Frameworks are available).

Do a call back to get a delta of the changed data and then animate the graph to move along to a certain point. If you use something like Flot then you can do it all with one JS Framework

AutomatedTester
A: 

I would go with just getting the new data since last timestep, using jQuery and JSON, and draw them to an HTML Canvas. See this link for a dynamic Canvas demo.

This assumes that you have Canvas available, it is not properly supported in IE. If Canvas is not an option, Flash is presumably the next best.

If you are updating the graph very often, like several times per second, you would probably need to look into options for streaming the data from the server.

j-g-faustus
A: 

This is how to draw ECG by a timer so you can have it continuous drawing:

http://osama-oransa.blogspot.com/2010/03/draw-ecg-using-java-script-draw.html

Ahmed