Home Forums Chart Support Load Local CSV File

Load Local CSV File

Viewing 2 posts - 1 through 2 (of 2 total)
  • #25620

    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);

    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

    #25630

    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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.