Chartjs-Issue populating chart.js from entity framework in .Net Core 5

1πŸ‘

βœ…

I think it’s just a spelling mistake of your ajax, the success of the Ajax call should be "success", not "sucess", after I corrected it, the data can be fetched normally.

jQuery.extend({
           getValues: function (url) {
               var result = null;
               debugger;
               $.ajax({
                   url: url,
                   type: 'get',
                   contentType: "application/json; charset=utf-8",
                   dataType: 'json',
                   async: false,
                   success: function (data) {
                       result=data;
                   },
                   error:function(){
                       return error;
                   }
               });
               return result;
           }
       });

Test Result:

enter image description here

Leave a comment