You must be logged in to post your query.
Home › Forums › Chart Support › Canvasjs Chart won’t render using Jsonresult data in Razor Pages
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.
@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
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.
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.
Hi Manoj – this is much appreciated.
Thank you.
You must be logged in to reply to this topic. Login/Register