Knowledgebase

How to upload to highchart ?

Posted by bambinou, 01-13-2013, 01:43 PM
Hello Is anyone familiar with a free script called HighChart please? I have a csv file generated by and android gps application that tracks my fuel consumption, I understand how HighCharts works but cannot work out how to create an upload interface that would let me upload my csv , create the graph and let me print it for personal keeping. Any idea how to do this please? How to ulpad the .csv and only parse particular columns for HighCharts use. Thanks in advance. Ben

Posted by LittleApps-Nick, 01-13-2013, 07:05 PM
You can upload the CSV file to HighCharts using AJAX and jQuery as shown in the example below from http://www.highcharts.com/documentation/how-to-use. This works with a CSV file that looks like the following:

Posted by bambinou, 01-14-2013, 04:31 AM
Hi, Thank you for the reply. I believe the code is for .csv data that is already uploaded to the server with ftp, but what I would like to achieve is have a page where there is a "browser file" button and "send" button to process my csv files which will always be organized the same way. Thank you, Ben

Posted by LittleApps-Nick, 01-14-2013, 10:02 PM
Then you would need to write PHP code to have the file uploaded to the server, saved to a directory accessible from the web and then use jQuery.get() on the URL to that file. Another option is to not use AJAX and instead of saving the uploaded file, then you would have your PHP code parse the CSV file and output it to the Javascript code for HighCharts.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
lytenhost down (Views: 605)


Language:

Client Login

Email

Password

Remember Me

Search