Home Forums Chart Support Canvasjs Chart won’t render using Jsonresult data in Razor Pages

Canvasjs Chart won’t render using Jsonresult data in Razor Pages

Viewing 5 posts - 1 through 5 (of 5 total)
  • #36338

    Hello. I’ve posted my question on Stack Overflow, rather than type it out again, could you please visit:

    https://stackoverflow.com/questions/70079212/canvasjs-chart-wont-render-using-jsonresult-data-in-razor-pages

    Many thanks.

    #36341

    @tgriffiths,

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

    —-
    Manoj Mohan
    Team CanvasJS

    #36343

    Hi Manoj

    I’m not sure if I am able to share a sample project reproducing my problem, it’s a .NET Core 3.1 Razor Page Application with an AJAX and Json data call.

    Did you get a chance to see the code I created in my Stack Overflow question? If it helps, I can copy that code into this thread?

    Thanks,
    Tony.

    #36354

    Tony,

    It seems like the response that you are getting from the AJAX call is of type string instead of JSON. Parsing the response before passing to dataPoints should work fine in your case. Please take a look at this sample project for an example on rendering CanvasJS chart in ASP.NET Core Razor Page Application.

    CanvasJS chart in ASP.NET Core Razor Page Application

    —-
    Manoj Mohan
    Team CanvasJS

    #36409

    Hi Manoj – this is much appreciated.

    Thank you.

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

You must be logged in to reply to this topic.