score:1

Accepted answer
var chart_options = {bindto: '#chart-data', {data: {type: "area"}} //...}
function generateChart(param1, param2, param3) {
  //do some stuff
  //ajax call from above
  // ....
  // on success:
  // chart_options.data.colums = data.active;
  // chart_options.data.groups = [data.groups];
  // same for axes…
  // c3.generate(chart_options)
}

Related Query