Html
<td>
<input type="checkbox" value="1" id="t1" checked="checked" class="filter" /><label
for="t1">T1</label>
</td>
<td>
<input type="checkbox" value="2" id="t2" checked="checked" class="filter" /><label
for="t2">T2</label>
</td>
<td>
<input type="checkbox" value="3" id="t3" checked="checked" class="filter" /><label
for="t3">T3</label>
</td>
<td>
<input type="checkbox" value="4" id="t4" checked="checked" class="filter" /><label
for="t4">Toplam</label>
</td>
Script:
$(document).ready(function () {
$(".filter").click(function () {
drawChart();
});
});
function drawChart()
{
// I want to get checkboxes value here.
var filters = {$("#t1").val(),$("#t2").val(),$("#t3").val(),$("#t4").val()};
var view = new google.visualization.DataView(new google.visualization.DataTable(evalledData, 0.5));
view.setColumns([0, 4]); //here you set the columns you want to display
}
I want to get checkboxes value like above but I dont know correct syntax? Or I would pass array to drawChart. Could you write correct syntax to create an array of checkboxes values?
Edit
I want to set view columns with view.setColumns([0, 4]); with using checkboxes. I mean I want to use view.setColumns([array]); instead of view.setColumns([0, 4]);
Thanks.