Live interaction with temperature sensor data

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Micael on 8th August 2016

Isn't the gauges suppose to work with sensors like an engine temp sensor?

Is there in that case anything you have to write in the html document to get that to work, or?

Posted by Richard on 8th August 2016
Hi there,

If you want to update the value of a (for example) progress bar, then get the new value (eg via AJAX) and the set it and finally redraw the chart. Which you can do like this:

RGraph.AJAX.getNumber('/url/to/get/new/value.php', function (val)
     // Set the new value on our progress bar
     myProgress.value = val;

     // Crucially you must redraw the canvas so that the chart is updated

There's a demo of fetching new data via AJAX in this demo:


Add a reply

« Back to message list