asgallant
unread,Jan 24, 2011, 3:14:05 PM1/24/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
Is it possible to make a cell span multiple columns in the Table
visualization? As an example, the following script:
<script type="text/javascript">
google.load("visualization", "1", {packages:["table"]});
google.setOnLoadCallback(drawTable);
function drawTable(){
var data = new google.visualization.DataTable();
data.addColumn("string", "Column 1");
data.addColumn("string", "Column 2");
data.addColumn("string", "Column 3");
data.addColumn("string", "Column 4");
data.addColumn("string", "Column 5");
data.addRow();
data.setValue(0,0,"1, 1");
data.setValue(0,1,"1, 2");
data.setValue(0,2,"1, 3");
data.setValue(0,3,"1, 4");
data.setValue(0,4,"1, 5");
data.addRow();
data.setValue(1,0,"2, 1");
data.setValue(1,1,"2, 2");
data.setValue(1,2,"2, 3");
data.setValue(1,3,"2, 4");
data.setValue(1,4,"2, 5");
data.addRow();
data.setValue(2,0,"Blank Row");
data.addRow();
data.setValue(3,0,"4, 1");
data.setValue(3,1,"4, 2");
data.setValue(3,2,"4, 3");
data.setValue(3,3,"4, 4");
data.setValue(3,4,"4, 5");
var table = new
google.visualization.Table(document.getElementById("table"));
table.draw(data);
}
</script>
generates a table with the (2,1), (2,2), (2,3), and (2,4) cells
empty. Is there a way to make cell (2,0) span multiple columns? In
straight-up HTML, I would just use <td colspan="[number of columns to
span]">...</td>, but that doesn't work here.