Graphs

Have you already written web applications to render real time data in graphs?

The data (relay outputs) are captured by a microprocessor and sent via RS232 to a Raspberry PI running Linux.

The data are time stamped (count of milliseconds).

The goal is to display the data in a graph with the time as X axis and the relays states as Y axis. There are several relays on a graph. The graph must be displayed on a host PC connected to the raspberry.

I have searched the web for solutions. There are javascript libraries that run on the browser and draw graphs. The problem is that there are millions of solutions and I would like to know if you have already made that sort of applications.

Reply to
Lanarcam
Loading thread data ...

Yes, a long time ago. I used Java as the predominant run-in-the-browser technology of the time. It was a nightmare. Java was only partly to blame.

As you say below, JavaScript is likely to be a better way to go.

FYI there is comp.sys.raspberry-pi if you later want to discuss that part of your project.

Sorry, I don't know of any. You could try comp.lang.javascript. There is a question on 5 July this year about a JavaScript graphics library, albeit with a different focus but the responses may help you anyway.

James

Reply to
James Harris

Thanks for that.

Reply to
Lanarcam

formatting link

or search on "Waveform display in browser".

I'm pretty sure that the consensus was that John wanted to generate a gif file (which can be pretty small if you're just displaying black lines on a white background) and do some HTML magic to make the thing update at a reasonable rate.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

That was how John wanted to do it. Many people offered him other alternatives which drew the graph in the browser.

--

Rick
Reply to
rickman

All of which are apropos to the OP's question.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

After reading the thread in sci.electronics.design, I am considering using Flot and Javascript. That is Flot, Jquery and Ajax on the client (PC) and python, JSON on the server (Raspberry). The server will update files in the JSON format and the client will read those files (or streams) using Ajax requests. The browser will call Ajax and then Flot to render the data as graphs.

You learn things everyday...

Reply to
Lanarcam

Den tirsdag den 8. september 2015 kl. 22.59.52 UTC+2 skrev Lanarcam:

e

hp

if

n
a

this might be interesting:

formatting link

-Lasse

Reply to
lasselangwadtchristensen

Take a look at SVG

Reply to
mac

Am Tue, 08 Sep 2015 19:01:05 +0200 schrieb Lanarcam:

Well, it's not that real-time, but I use rrdtool to store temperature data and its associated rrdgraph to generate graphs that are referenced by an HTML page.

HTH. Martin

Reply to
mblume

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.