[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Dynamic diagram

Peter Meier

9/5/2006 9:32:00 AM

Hi,

I want to show a measurement value in a diagram.

The problem is that the diagram should be visible, when new values are
added into the diagram. There is round about one value per minute.

Does anyone has some advice ?

Thanks
Peter
4 Answers

Phlip

9/5/2006 1:43:00 PM

0

Peter Meier wrote:

> I want to show a measurement value in a diagram.
>
> The problem is that the diagram should be visible, when new values are
> added into the diagram. There is round about one value per minute.

By "diagram" do you mean "chart"? If so, use BLT (which I think only binds
with Python or something).

If you actually mean a diagram, like a graph, with circles and arrows, try
this:

http://wiki.rubygarden.org/Ruby/page/show...

Updating it in real-time should only require a little work. I have
bench-versions which do that, so if you actually need it ping me privately.

--
Phlip
http://c2.com/cgi/wik... <-- NOT a blog!!!


Gavin Kistner

9/5/2006 3:24:00 PM

0

Phlip wrote:
> http://wiki.rubygarden.org/Ruby/page/show...
>
> Updating it in real-time should only require a little work. I have
> bench-versions which do that, so if you actually need it ping me privately.

Since SVG using progressive rendering and the "painters model", you can
actually start streaming an SVG file and just send new information when
it's available (if you can live with new content always drawing on top
of old).

Alternatively, you can use AJAXian style JS communication to poll and
receive new data, modifying the SVG DOM on the fly to add new data.

Phlip

9/5/2006 4:09:00 PM

0

Phrogz wrote:

>> http://wiki.rubygarden.org/Ruby/page/show...
>>
>> Updating it in real-time should only require a little work. I have
>> bench-versions which do that, so if you actually need it ping me
>> privately.
>
> Since SVG using progressive rendering and the "painters model", you can
> actually start streaming an SVG file and just send new information when
> it's available (if you can live with new content always drawing on top
> of old).
>
> Alternatively, you can use AJAXian style JS communication to poll and
> receive new data, modifying the SVG DOM on the fly to add new data.

SVG ain't just for web pages. (I have barely researched how it's used
there!)

--
Phlip
http://c2.com/cgi/wik... <-- NOT a blog!!!


Suraj Kurapati

9/11/2006 3:48:00 AM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Meier wrote:
> I want to show a measurement value in a diagram.
>
> The problem is that the diagram should be visible, when new values are
> added into the diagram. There is round about one value per minute.

Try the gnuplot extension for Ruby. You can add new values to the
plot and watch it appear in real-time.

I learned this from a friend who used it to easily visualize voltage
readings from a microcontroller in real-time.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFBNx9mV9O7RYnKMcRAkpDAJ9h86cexkCc8pJq9E4KFGWkMGRsfQCgrXH6
IP89QyuzAwuSul9/VZeAf1Y=
=2R3h
-----END PGP SIGNATURE-----