I can't seem to get this code to provide color formatting.

Everything appears to be correct, but color doing will not happen.  I
am wondering what I need to do to get it to work with a dataTable made
from a query.

Any help is greatly appreciated.

----- Begin Code -----
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
    <meta http-equiv="content-type" content="text/html;
charset=utf-8">
        <title>NAGP Saturday League - Standings</title>
 <script type="text/javascript" src="http://www.google.com/jsapi?
key=ABQIAAAADvHPGt3WuLpQyiLlTrgDuhTgxa3AWtzXOxLbf6k0J8OowsWAKxRw0iAqusK43eWko8KfJVbuz4QBcA">
 </script>
    <script type="text/javascript">
                google.setOnLoadCallback(drawTable);

                google.load('visualization', '1', {packages:['table']});

                function drawTable() {
                        var tblQuery = new google.visualization.Query('http://
spreadsheets.google.com/pub?
key=thaaO1rdS8Csm40Eg49yYYw&headers=1&gid=2');
                        // Apply query language.
                        tblQuery.setQuery('SELECT *');
                        // Send the query with a callback function.
                        tblQuery.send(tblQueryResponse);
                }

                function tblQueryResponse(response) {
                        if (response.isError()) {
                                alert('Error in query: ' + 
response.getMessage() + ' ' +
response.getDetailedMessage());
                                return;
                        }

                        tblResults = response.getDataTable();
                        var tblDraw = new 
google.visualization.Table(document.getElementById
('visualization'));

                                var tblFormat = new 
google.visualization.TableColorFormat();
                                tblFormat.addRange(null,2,'black','#33ff33');
                                tblFormat.format(tblResults,4);

                        tblDraw.draw(tblResults, {showRowNumber: false, 
allowHTML: true,
page:'enable', pageSize:10, alternatingRowStyle:false});
                        }

    </script>
</head>
<body style="font-family: Helvetica;font-size: 10pt;border: 0 none;">
<h3 >Season Standings</h3>
<hr size=1 width="100%">
<div id="visualization" style="width:600px;height=400px;"></div>
</body>
</html>

----- End Code -----

--

You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.


Reply via email to