I wish to add an object model to a Google chart dynamically at runtime. I call a php function using AJAX to get the data and based on the number of columns, I wish to make the last column a line chart.
I wish to replace 5 by c as per below script.
c = data.getNumberOfColumns()-2
var options = {
width: 400,
height: 240,
seriesType: "bars",
series: {5: {type: "line"}},
};