Chartjs-Cannot visualise chartJS data in ASP .NET Core

1👍

Your function GetJSON_Simple_workTS is broken, it’s missing a ) and it has return resp; as part of the $.ajax request options.

The $.ajax success callback gets called asynchronously, therefore if you’re not familiar with async and promises, I would suggest putting your chart creation code in a function and calling that in the success callback, otherwise your GetJSON_Simple_workTS function will return an empty array as it hasn’t waited for the response to come back.

Leave a comment