Home forums Chart Support Collection data with Ajax

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #10378

    please help me collection live data with Ajax from Json.
    It like:
    $(document).ready(function () {
    type: ‘GET’,
    url: ‘http://example/functions.php’,
    data: { get_param: ‘value’ },
    success: function (data) {
    var names = data

    I take it from: http://stackoverflow.com/questions/8951810/how-to-parse-json-data-with-jquery-javascript
    Help me to collection Json to render graph



    Here is an example for loading JSON data from external source using AJAX.

    You can also refer loading data from external JSON in this example.



    This is my implementation, using AJAX requests. Unfortunately, i’m unable to find out why it is not working, Kindly help finding where I have gone wrong.


    Generally JavaScript code will function in the head before code in the body. The head section is usually used to contain information about the page that you don’t necessarily see like the meta keywords meta description or title of a page.

    Here in your case, Buttons with id ‘chart1’ and ‘chart2’ are created after script is run, but where it fails to fetch buttons with those ids. You can move script tag to body so that it works fine. Here is your working code.

    Refer these links for more info on placement of JavaScript code.

    • This reply was modified 4 years, 6 months ago by Vishwas R.

    Thank you for the help.
    It doesn’t seem to work after including the processdata function. It throws a “Chart not defined error”.
    This is the code


    Kindly update the code with absolute path of the CSV-file, so that we can look into it and help you out. Refer this jsfiddle for rendering multiple charts from multiple external CSV.


    Thank you so much! Passing the “chart” as parameter solved it!


    Hi, Im creating a chart from a collection data with ajax using example like you (@Vishwas R) mentioned above. My code seems to be working in jsfiddle in this my chart but it doesn’t seem to be working when I use the same code in a text editor(in my case Sublime Text)

    • This reply was modified 4 years, 5 months ago by saimeera.jp.
    • This reply was modified 4 years, 5 months ago by saimeera.jp.


    We observed that you are using dateTime over axis-X. Kindly refer this link for JavaScript date-time object.

    Here is the working fiddle.

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

You must be logged in to reply to this topic.