Fighting with formatting a Visual API Google sheet to HTML with CSS class names.
Here is the code I'm fighting with. You'll see I've tried numerous ways to format the table background to black with a larger white font. Any help would be great.
---------------------------------------------------------------------------------------------------------------------------------------------------------
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Announcement test</title>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart', 'table']});
google.charts.setOnLoadCallback(drawTable);
function drawTable() {
var allowHtml = true;
var cssClassNames = {
'headerRow': 'Title_Table',
'tableRow': 'Black_Table',
'oddTableRow': '',
'selectedTableRow': '',
'hoverTableRow': '',
'headerCell': '',
'tableCell': '',
'rowNumberCell': ''
};
var query = new google.visualization.Query(
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
return;
}
// setProperty(1, 1, *, {style: 'font-style:bold; font-size:22px;'});
var data = response.getDataTable();
var chart = new google.visualization.Table(document.getElementById('table_div'));
chart.draw(data);
}
</script>
<style type="text/css">
.Table_Format{
width: 800px;
text-align:center;
background-color:black;
color:white;
padding:20px;
}
.Title_Table {
font-size: x-large;
font-weight: bold;
color: #FFF;
background-color: #000;
}
.Black_Table{
font-size: large;
color: #FFF;
background-color: #000;
}
body,td,th {
font-size: large;
color: #FFF;
background-color: #000;
}
body {
background-color: #000;
}
</style>
</head>
<body>
<div id="table_div" class="Table_Format"></div>
</body>
</html>