Can I fetch data directly from 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 Bharati on 31st October 2017
instead of using data: [33.1,14.5,11.8,10.2,10.4,9.5,4.5,1.1,4.9]
Can I directly get data from csv file to plot graph
Posted by Richard on 31st October 2017
Hi,

Yes - there's a CSV reader for both the canvas and SVG types of charts. Here's the docs page that applies to both:

www.rgraph.net/canvas/docs/csv-file-reader.html

Richard
Posted by Bharati on 31st October 2017
Hi ,

Thanks for quick response , in that example only second column value is used as data , in my csv file there are more than one column that are used as data for graph , to plot multiple lines graph in one.
Posted by Richard on 31st October 2017
Hi,

Then you can use the CSV objects .getCol() method to get more columns of data from the CSV file/ The full API is documented here:

www.rgraph.net/canvas/docs/csv-file-reader.html#api

Richard

Add a reply




« Back to message list