I'm using RGraph on a Raspberry Pi and all I get is a blank page

« 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 ED on 15th January 2016
I am a complete noob on some of this stuff. I probably have something simply wrong. I want to use some guages to show temperatures from sensors on a raspberry pi. I found this site and I thought Aha! Not so much so far, my own ignorance for sure. Here is the code I have

<!DOCTYPE html>
<meta charset="UTF-8">
<script src="../libraries/RGraph.common.core.js"></script>
<script src="../libraries/RGraph.gauge.js"></script>
<title>Test Guage Page!</title>
<canvas id="cvs" width="250" height="250">
     [No canvas support]
     window.onload = function ()
         var gauge = new RGraph.Gauge({
             id: 'cvs',
             min: 0,
             max: 10,
             value: 3.2

My file is in /var/www/Rgraph directory. All the other Rgraph files and folders are in this directory. What do I have wrong? Can someone tell me?


Posted by Richard on 15th January 2016

The code is fine - the only thing that I can see may be wrong is the paths to the libraries.

If your files are in /var/www/Rgraph as you say then create a folder in there called libraries and put the libraries in it, so the paths to them look like this:


Then in your HTML file you can refer to them like this:

<script src="./libraries/RGraph.common.core.js"></script>
<script src="./libraries/RGraph.gauge.js"></script>


Add a reply

« Back to message list