Home forums Feature Requests & Feedback Graph with CSV as data is not working

This topic contains 4 replies, has 2 voices, and was last updated by  rajesh.ntcgroup 4 days, 17 hours ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20771

    Hi Team,
    We are trying to create Graph from CSV file. We got code from the below link

    Creating Charts from CSV

    We do not get the expected out. It just have blank page. Please help us.

    Regards,
    Rajesh Sudharsan

    #20772

    Vishwas R
    Keymaster

    Rajesh Sudharsan,

    For security reasons, browsers restrict cross-origin requests. Please refer this stackOverflow post for more information. Serving CSV file from local webserver and making an AJAX call to it or serving it from CORS enabled CSV hosting should work fine in this case. Please take a look at this jsfiddle.

    Also can you please check the Browser Console if there are any errors. Can you kindly create jsfiddle reproducing the issue if you are facing any other issues?


    Vishwas R
    Team CanvasJS

    #20777

    Hi Vishwas R,
    Thanks for your reply. I need to keep CSV file in my computer. I dont need to get from external domain. How Can I do it.

    Regards,
    Rajesh Sudharsan

    #20779

    Vishwas R
    Keymaster

    Rajesh Sudharsan,

    Sorry, it’s not possible to load csv data from local machine unless its served from a local webserver or from same domain where html is hosted. It’s basically a browser restriction for security reasons. Please refer this page for more info on Cross-Origin Requests.


    Vishwas R
    Team CanvasJS

    #20780

    Hi Vishwas R,
    Thank you very much.

    Regrds,
    Rajesh Sudharsan

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

You must be logged in to reply to this topic.