Normally, I would suggest using the ChartWrapper's 'view' option (what you are accessing through the setView method), but since you are getting entering a column list from somewhere else already, I will present an alternative as well.
Method 1: set the 'view' option
// assumes you used a DateFormat (or other) formatter on the date column already
var columns = [];
columns.push({
type: 'string',
label: data.getColumnLabel(options[page].visibleColumns[0]),
calc: function (dt, row) {
// if you didn't format already, you can do it here (get raw date with the #getValue method instead)
return dt.getFormattedValue(row, options[page].visibleColumns[0]);
}
});
// add in the rest of the columns
for (var i = 1; i < options[page].visibleColumns.length; i++) {
columns.push(options[page].visibleColumns[i]);
}
cw.setView({columns: columns});
Method 2: create a view object to drive the chart
// in this view, EVERY column in the DataTable in included, in order
var view = new google.visualization.DataView(data);
view.setColumns([
/* list of columns preceeding date column */
{
type: 'string',
label: data.getColumnLabel(indexOfDateColumn),
calc: function (dt, row) {
return dt.getFormattedValue(row, indexOfDateColumn);
}
}
/* list of columns following date column */
]);
cw.setDataTable(view);