How to call data to be used for the graph from a file on the FTP server

22 views
Skip to first unread message

oniosun temidayo isaiah

unread,
May 14, 2016, 10:12:27 PM5/14/16
to Google Visualization API
Hello Everyone. I am new to this.

however, I have a particular sensor that sends data real-time to my ftp server and save it in a particular directory and I want to use this data to be plotting graphs in real time on my website. I want to be able to specify the row and column that will be plotted from the file on the graph. Please help me
Message has been deleted

Giulio Mastrosanti

unread,
May 17, 2016, 5:50:22 PM5/17/16
to Google Visualization API
well,
I think you should read the data on the server side using AJAX, just as I do for interrogating a database.
from my web page I do an AJAX call to a php file on the server, that performs a query on the database and then sends back the data in JSON format, that then is used by javascript to populate the DataTable and then draw the chart.
In your case, the php ( or whatever ) on the server side should read  the file, parse it some way depending on file format ( tab delimited,etc ) and return a JSON object

for the real time I think you could set a timer, and at a given interval populate again the DataTable a draw again the chart

hope this helps,
Giulio
Reply all
Reply to author
Forward
0 new messages