Chartjs-Javascript not populate chart after retrieve json data

0👍

There is at least one issue with naming: your control is <asp:TextBox ID="txtDate" but you call $("[id*=txtdate]").val(); which seems need to be txtDate (with capital D) too.

Regarding ajax – you need to debug the function to ensure what it gets on every step. Add debugger; or alert(); where it is necessary and run the code. For example, add

...
success: function (r) {
   alert(r);
   var labels = r.d[0];
...

and see if r will be defined.

Leave a comment