You must be logged in to post your query.
Home › Forums › Chart Support › Load Local CSV File
Hi there, I have a quick question regarding the creation of charts from a file. I saw that there is an example for the financial charts where a get function is used: $.get("https://canvasjs.com/data/gallery/javascript/netflix-stock-price.csv", getDataPointsFromCSV);
$.get("https://canvasjs.com/data/gallery/javascript/netflix-stock-price.csv", getDataPointsFromCSV);
I am trying to load a file that I have saved locally from my PC. Do I still have to use this get function or is there another way?
Thank you! Regards, Marco
Marco,
For security reasons, browsers restrict reading local CSV files and cross-origin requests. Please refer to this StackOverflow post for more information. Serving CSV file from a local web server and making an AJAX call to it or serving it from CORS enabled CSV hosting should work fine in this case.
— Shashi Ranjan Team CanvasJS
You must be logged in to reply to this topic. Login/Register