# update_data_donut_chart.js

var data1 = [
    {name: "Male", value: 10},
    {name: "Female", value: 35},
    {name: "Other", value: 25},
];

var data2 = [
    {name: "Male", value: 10},
    {name: "Female", value: 90},
];

var options = {
   id:"chart",
   data: {
       plain: data1
   },
};
var donutChart = new C9.DonutChart(options);
donutChart.draw();

setTimeout(function(){
    donutChart.updateData(data2); // Update data goes here
}, 3000);