I'm having problems trying to read a CSV file

« 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 Armando on 28th February 2013
Hello, i'm trying to read a csv file to draw a Line Graph, however i'm having some problems (like, can't open the file). I've tried the example from


but when I try to run the code the graph does not display :<
Sorry if this question is dumb, but I'm a newbie on this
Posted by RGraph support on 28th February 2013
Hi there,

Well you first need to ensure that you are getting the file correctly with your AJAX call. So instead of trying to parse something that may or may not be there - use alert() to verify that you're getting back the file.

Richard, RGraph Support
Posted by Armando on 28th February 2013
So, i've discovered i'm not getting the file :<
is there a way to open it directly from the directory? "C:/.....sample.csv"?
Posted by RGraph support on 28th February 2013
Hi there,

No it needs to be within your "web root". So muh like you can access your webpage with an address like this:


Or this (if you're working on your machine):


You need to place your CSV file so that you can get to it with something like this:


Or this:


And if you're not using a webserver (ie you're accessing files through your file system with an address like this: C:\test.html ) - then AJAX won't work. IIRC there's a demo of an AJAX page in the demos folder of the archive - one of the Gauge demos. Though again - you need to be using a webserver.

RGraph Support
Posted by Dan on 17th March 2013
I meant the X axis for the labels. Please forgive my lack of experience in these postings. I may have doubled up the question. Thanks again everyone.

Add a reply

« Back to message list