I am unable to track the "invalid label error" that i am receiving in
firebird against this JSON response for the html table drawing code below. I
have tried this to add/delete the "sig" field as well but no use .. i am
getting this "invalid label error" .. please can someone help me in this ..
:(
JSON RESPONSE
==============================================================================================
google.visualization.Query.setResponse(
{
"version":"0.5",
"reqId":"0",
"status":"OK",
"table":
{
"cols":
[
{"id":"name","label":"Name","type":"string"},
{"id":"salary","label":"Salary","type":"number"}
],
"rows":
[
{
"c":
[
{"v":"jim","f":"jim"},
{"v":800,"f":"800"}
]
},
{
"c":
[
{"v":"bob","f":"bob"},
{"v":7000,"f":"7000"}
]
},
{
"c":
[
{"v":"mike","f":"mike"},
{"v":10000,"f":"10000"}
]
},
{
"c":
[
{"v":"alice","f":"alice"},
{"v":12500,"f":"12500"}
]
}
]
}
}
);
==============================================================================================
HTML CODE
==============================================================================================
<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi
"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["table, barchart,
areachart"]});
google.setOnLoadCallback(initialize);
function initialize() {
var query = new google.visualization.Query('
http://localhost:8080/pin-web/reports/rawData?reportType=5');
query.send(drawTable);
}
function drawTable(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
var table = new
google.visualization.Table(document.getElementById('table_div'));
table.draw(data, {showRowNumber: false});
var barchart = new
google.visualization.BarChart(document.getElementById('chart_div'));
barchart.draw(data, {width: 600, height: 340, is3D: true, isStacked: true,
title: 'Hourly usage'});
}
</script>
</head>
<body>
<div id="table_div"></div>
<div id="chart_div"></div>
</body>
</html>
==============================================================================================
..alee
http://techboard.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---