Home forums Using CanvasJS $.getJSON is not working

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 1 week, 6 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17474

    nitin_nn
    Member

    I am trying to run the sample code that you have given in the ‘JavaScript Charts from JSON Data API and AJAX’ section. But when I run it in any browser, it returns a blank page and I think the $.getJSON is not working. Can you please suggest a workaround? I am taking the program given by you as it is, but still there is no graph.

    #17475

    Vishwas R
    Keymaster

    @nitin_nn,

    For security reasons, browsers restrict cross-origin requests. JSONP allows you to sidestep the cross-origin requests. Please refer JSONP for more info.

    You can also take a look at this jsFiddle for an example on JSONP.


    Vishwas R
    Team CanvasJS

    #17481

    nitin_nn
    Member

    Thanks for the reply. Even after using JSONP, it is still displaying a blank page. Can you do the modification in the your original source code and post here? I am new to web programming.

    #17499

    Vishwas R
    Keymaster

    @nitin_nn,

    Please download static html from here.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.