Hi,
i've built this function that should redraw a table making me choose the fields.
When i click on a checkbox (.fieldsel), i take all the checked value in a form(#selectcampi) and put them in allVals array.
....
$('.fieldsel').click(function() { var allVals = new Array(); $('#selectcampi :checked').each(function() { allVals.push($(this).val()); }); var v = new google.visualization.DataView(data); v.setColumns(allVals); table.setView(v.toJSON()); table.draw();});
The problem is that v.setColumns(); doesn't accept this array.
The error is:
Uncaught Error: Invalid column input, expected either a number or an object.
How could i pass to .setColumns() a list of columns properly?
Or maybe there is a way to pass it directly to .setView() without declare a .DataView?
Thanks!
Marco