# update_data_bar_chart.js

var data1 = [
  {name: "A", value:  .0245},
  {name: "B", value:  .01492},
  {name: "C", value:  .02782},
  {name: "D", value:  .04253},
  {name: "E", value:  .02},
  {name: "F", value:  .02288},
  {name: "G", value:  .02015},
  {name: "H", value:  .06094},
  {name: "I", value:  .5},
];

var data2 = [
  {name: "AA", value: .0245},
  {name: "BB", value:  .01492},
  {name: "CC", value: .02782},
  {name: "DD", value: .04253},
  {name: "EE", value: .005}
];

var options1 = {
  id: "chart",
  data: {
    plain: data1
  }
};

var barChart = new C9.BarChart(options1);
barChart.draw();

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