[Chartjs]-Chart is not getting updated from the values it received from Jquery

2👍

Your response from API is object with data property, not just array with results

$.getJSON("/dashboard/", function(response, status)
        {
            chart.data.datasets[0].data = response.data;
            chart.update();
        } 

0👍

Your test_data is currently an object. You need to use

var test_data=data.data;

to access the array which is required.

Leave a comment