Hi,I am new to the Visualization API and have been trying to style and center a certain set of cells in the table and I cannot seem to do it.
Below is a quick overview of the code:
var data = new google.visualization.DataTable();
data.addColumn( "string", "Col 1" );
data.addColumn( "number", "Col 2" );
data.addColumn( "string", "Col 3" );data.addRow( [{v: "cell 11"}, {v: 12}, {v: "cell 13", p:{style: 'color:red; text-align: center;'}}] );
data.addRow( [{v: "cell 21"}, {v: 22}, {v: "cell 23"}] );
data.addRow( [{v: "cell 31",p:{style: 'text-align: center;'}}, {v: 32}, {v: "cell 33"}] );
var options = { 'showRowNumber': true, 'sortColumn': 1, 'sortAscending': false };
var table = new google.visualization.Table( document.getElementById( 'tbl' ) );
chartTable.draw( data, options );Thanks for all the help. =)
You have to set the "allowHtml" option to true.