Bar chart not appearing on my page

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 calvin on 1st May 2016
This is s GREAT product!!!!!

I have followed your reference but can't see the graph?

Below is the script reference I entered in my Wordpress page.

<script src="www.my_URL.com/javascript/rgraph/RGraph.common.core.js\"></script>

<script src="www.my_URL.com/javascript/rgraph/RGraph.bar.js\"></script>
 
<canvas id="cvs" width="900" height="250">
     [No canvas support]
</canvas>

<script>
     new RGraph.Bar({
         id: 'cvs',
         data: [4,8,6,3,1,2,5],
         options: {
             textSize: 16,
             textAccessible: true,
             labels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
             shadowBlur: 0,
             shadowOffsetx: 2,
             shadowOffsety: 2,
             strokestyle: 'rgba(0,0,0,0)',
             backgroundGridVlines: false,
             backgroundGridBorder: false,
             noxaxis: true,
             colors: ['Gradient(#d0d:#303)']
         }
     }).grow();
</script>

I am a newbie, so it is probably something simple that I am missing.


Thank you in advance for your help!
Posted by Richard on 1st May 2016
Hi,

What error message (if any) is there in your JavaScript console? In Chrome you can press CTRL+SHIFT+J to bring it up.

Trying to debug your JavaScript without it will be difficult to say the least!





Richard
Posted by Richard on 1st May 2016
Hi there,

I forgot to give you a URL to a video about the Chrome developer tools by (I think) Google peeps:

www.rgraph.net/docs/howto-debug-your-charts-with-chrome.html







Richard
Posted by calvin on 1st May 2016
Thank you Richard.

I see a few errors

X Failed to load resource: the server responded with a status of 404 (Not Found)
X Uncaught SyntaxError: Unexpected token <
X WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403
Posted by Richard on 1st May 2016
Hi,

> Failed to load resource: the server responded with a status of 404 (Not Found)

If this is an RGraph resouce that it failed to load then that will be why the charts are not appearing. Check that you have the paths to the files correct.

> Uncaught SyntaxError: Unexpected token <

You might have an errant "<" in your code on the line (or just below the line) that it mentions.

> WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403

I don't think that this is related to RGraph.





Richard
Posted by Richard on 1st May 2016
Hi,

Also, it might be helpful if you link to the page in question.



Richard
Posted by calvin on 1st May 2016
Thank you Richard!!! It is working now.

You are correct, it was not related to RGraph... It was a newbie (me) error.

Checking the js error was the answer.

Have a Wonderful Day Richard!!


Again, This is GREAT and thank you!!!

Add a reply




« Back to message list