0👍
Thanks for the response. But managed to figure it out. I need to make changes to my Ajax call to update the values of my doughnuts directly and get rid of my table_space function:
$.ajax({
url: "<!--#include virtual="../include/env"-->/data",
type: "GET",
cache: "false",
success: function(value) {
Doughnut1.data.datasets[0].data = [value[0].USED, value[0].FREE]
Doughnut2.data.datasets[0].data = [value[1].USED, value[1].FREE]
Doughnut3.data.datasets[0].data = [value[2].USED, value[2].FREE]
Doughnut1.update();
Doughnut2.update();
Doughnut3.update();
},
dataType: "json"
});
Source:stackexchange.com