Home forums Using CanvasJS chart renders blank

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 2 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25693

    Here’s my fiddle.
    https://jsfiddle.net/dtp69nzg/

    Here’s my json response
    [{“x”:”2019-06-27 3p”,”y”:”70″},{“x”:”2019-06-27 4p”,”y”:”68″},{“x”:”2019-06-27 5p”,”y”:”67″},{“x”:”2019-06-27 6p”,”y”:”66″},{“x”:”2019-06-27 7p”,”y”:”65″},{“x”:”2019-06-27 8p”,”y”:”66″},{“x”:”2019-06-27 9p”,”y”:”65″},{“x”:”2019-06-27 10p”,”y”:”66″},{“x”:”2019-06-27 11p”,”y”:”65″},{“x”:”2019-06-28 12p”,”y”:”66″},{“x”:”2019-06-28 1p”,”y”:”65″},{“x”:”2019-06-28 2p”,”y”:”66″},{“x”:”2019-06-28 3p”,”y”:”65″},{“x”:”2019-06-28 4p”,”y”:”65″},{“x”:”2019-06-28 5p”,”y”:”66″},{“x”:”2019-06-28 6p”,”y”:”65″},{“x”:”2019-06-28 7p”,”y”:”66″},{“x”:”2019-06-28 8p”,”y”:”65″},{“x”:”2019-06-28 9p”,”y”:”66″},{“x”:”2019-06-28 10p”,”y”:”65″},{“x”:”2019-06-28 11p”,”y”:”66″},{“x”:”2019-06-28 12p”,”y”:”65″},{“x”:”2019-06-28 1p”,”y”:”66″},{“x”:”2019-06-28 2p”,”y”:”66″},{“x”:”2019-06-28 3p”,”y”:”66″},{“x”:”2019-06-28 4p”,”y”:”66″},{“x”:”2019-06-28 5p”,”y”:”66″},{“x”:”2019-06-28 6p”,”y”:”66″},{“x”:”2019-06-28 7p”,”y”:”65″},{“x”:”2019-06-28 8p”,”y”:”66″},{“x”:”2019-06-28 9p”,”y”:”65″},{“x”:”2019-06-28 10p”,”y”:”66″},{“x”:”2019-06-28 11p”,”y”:”65″},{“x”:”2019-06-29 12p”,”y”:”66″},{“x”:”2019-06-29 1p”,”y”:”65″},{“x”:”2019-06-29 2p”,”y”:”66″},{“x”:”2019-06-29 3p”,”y”:”65″},{“x”:”2019-06-29 4p”,”y”:”65″},{“x”:”2019-06-29 5p”,”y”:”64″},{“x”:”2019-06-29 6p”,”y”:”65″},{“x”:”2019-06-29 7p”,”y”:”65″},{“x”:”2019-06-29 8p”,”y”:”65″},{“x”:”2019-06-29 9p”,”y”:”66″},{“x”:”2019-06-29 10p”,”y”:”65″},{“x”:”2019-06-29 11p”,”y”:”66″},{“x”:”2019-06-29 12p”,”y”:”65″},{“x”:”2019-06-29 1p”,”y”:”66″},{“x”:”2019-06-29 2p”,”y”:”67″},{“x”:”2019-06-29 3p”,”y”:”66″},{“x”:”2019-06-29 4p”,”y”:”66″},{“x”:”2019-06-29 5p”,”y”:”67″},{“x”:”2019-06-29 6p”,”y”:”67″},{“x”:”2019-06-29 7p”,”y”:”65″},{“x”:”2019-06-29 8p”,”y”:”66″},{“x”:”2019-06-29 9p”,”y”:”66″},{“x”:”2019-06-29 10p”,”y”:”65″},{“x”:”2019-06-29 11p”,”y”:”66″},{“x”:”2019-06-30 12p”,”y”:”66″},{“x”:”2019-06-30 1p”,”y”:”66″},{“x”:”2019-06-30 2p”,”y”:”65″},{“x”:”2019-06-30 3p”,”y”:”66″},{“x”:”2019-06-30 4p”,”y”:”66″},{“x”:”2019-06-30 5p”,”y”:”66″},{“x”:”2019-06-30 6p”,”y”:”66″},{“x”:”2019-06-30 7p”,”y”:”65″},{“x”:”2019-06-30 8p”,”y”:”66″},{“x”:”2019-06-30 9p”,”y”:”66″},{“x”:”2019-06-30 10p”,”y”:”66″}]

    It renders the X and Y axes. But no data. What am I doing wrong?

    #25698

    @taquitosensei,

    X value can either be number or date-time where as y-value can be number. But in the sample JSON that you have shared, x-value is not a valid date-time object and y-value is a string because of which you would be getting a blank chart. Changing the x and y-values to valid date-time and number respectively should work fine in your case. Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.