Home Forums Chart Support empty graph is display

empty graph is display

Viewing 8 posts - 1 through 8 (of 8 total)
  • #43067

    I found a example on your support website but it don’t work.
    When I put in separate files I get nothing
    all the files are in my subdomain folder
    Best regards,

    When I put all in one file I get this



    This is the link to the code



    Can you kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with sample data so that we can look into your code, run it locally at our end to understand the scenario better and help you out?

    Manoj Mohan
    Team CanvasJS


    Hello Manoj,
    Thanks for your answer.
    it looks $.getJSON is not working
    I try different examples but all the same result.
    i installed the free version on my hosting
    this is the link to google drive i put the 2 files in one txt file




    It seems like you are pushing wrong values to dps. You need to use result[i].label and result[i].y instead of result[i].Time and result[i].Ampere respectively.

    dps.push({"label":result[i].label, "y":result[i].y});

    If this doesn’t solve your issue, kindly share sample data you are getting from database so that we can reproduce the issue you are facing at our end and help you with an appropriate solution.

    Manoj Mohan
    Team CanvasJS


    Hello Manoj,
    Thanks for your answer.
    but still blank page
    i put two files on google drive



    It seems like you are passing string as y-value. CanvasJS accepts number as y-value as of now. Passing it as number by parsing it should work fine in your case. Also, updating the url to fetch data from database (replace ajax/data.php with data.php) seems to be working fine.

    dps.push({ "label":result[i].label, "y":parseFloat(result[i].y) });

    Please take a look at this updated sample project for complete working code.

    CanvasJS PHP Line Chart with data from Database

    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.