Strange indeed, but i'm glad it works now. - V. On Wed, Mar 18, 2009 at 12:20 PM, alee amin <[email protected]>wrote:
> I have fixed the issue but honestly i don't know what was wrong in it. I am > using one servelet for YUI response and GoogleVis response and i was getting > the error. no sooner did i separated the code of these 2 from 1 servelt to 2 > it was working fine. THE SAME CODE .. :S > ..alee > http://techboard.wordpress.com > > > > On Mon, Mar 9, 2009 at 10:43 PM, VizBoy <[email protected]> wrote: > >> Hi, >> >> I just tried it and I get a perfect table and barchart... >> Tested on firefox 3 on windows. >> Please try on other computers/browsers, and also try to put the entire >> json response in a file and just give the url of that file in the new >> Query(...) and let me know if it works. >> >> Regards, >> VizBoy. >> >> >> On Fri, Mar 6, 2009 at 1:27 PM, alee amin <[email protected] >> > wrote: >> >>> 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'<http://localhost:8080/pin-web/reports/rawData?reportType=5%27> >>> ); >>> 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 -~----------~----~----~----~------~----~------~--~---
