See two of the logs:
2013-11-08 08:00:06.052
/query?id=ahBzfmFuYWx5dGljcy1kYXNochULEghBcGlRdWVyeRiAgICAgOTRCAw&format=data-table-response&tq=SELECT%20A%2CD%20WHERE%20D%20%3E%20100%20ORDER%20BY%20D&tqx=
*reqId%3A0* 200 1298ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0)
Gecko/2010010
2013-11-08 08:00:06.013
/query?id=ahBzfmFuYWx5dGljcy1kYXNochULEghBcGlRdWVyeRiAgICA8N6QCQw&format=data-table-response&tqx=
*reqId%3A2* 200 1259ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0)
Gecko/20100101 Firefox/25.0 module=default version=1
The first one sends a reqId 0 from what I can see. Is this what you meant?
If so, is this a SuperProxy issue or is it something I can fix?
Thanks so much for all your help so far.
On Friday, 8 November 2013 15:55:52 UTC, asgallant wrote:
>
> Check your server logs to see what the browser is sending to the server.
> If the browser sends "reqId=8" then "reqId":"8" is the appropriate
> response. If the browser sends "reqId=0", then your server is doing
> something wrong.
>
> On Friday, November 8, 2013 4:41:21 AM UTC-5, Sylwia Kowalczuk wrote:
>>
>> Yes the reqId's in the query are changing so first when I enable the
>> public endpoint I get this:
>>
>> google.visualization.Query.setResponse({"status":"ok","table":{"rows":[{"c":[{"v":"43.58946569849355"}]}],"cols":[{"type":"string","id":"ga:visitBounceRate","label":"ga:visitBounceRate"}]},*"reqId":"0"*,"version":"0.6"});
>>
>>
>>
>> And after a while when I refresh the page where I have the google charts
>> embedded I get a message 'request timed out' or 'invalid data type'
>> (although previously it worked). I'm trying to use multiple charts on one
>> page.
>>
>> When these errors come up the only thing I noticed that changes is the
>> reqId of the query. So the data looks like this:
>>
>> google.visualization.Query.setResponse({"status":"ok","table":{"rows":[{"c":[{"v":"43.58946569849355"}]}],"cols":[{"type":"string","id":"ga:visitBounceRate","label":"ga:visitBounceRate"}]},"*reqId":"8"*,"version":"0.6"});
>>
>>
>> Once I disable the public endpoint and refresh the SuperProxy query
>> within the app the reqId is reset to 0 and data starts coming through again.
>>
>> Are these server errors then? If so, is there a place I can flag this up?
>>
>>
>> On Thursday, 7 November 2013 18:28:49 UTC, asgallant wrote:
>>>
>>> Are the reqId's coming from the query changing? The server should
>>> always return what the client sends.
>>>
>>> On Thursday, November 7, 2013 12:09:20 PM UTC-5, Sylwia Kowalczuk wrote:
>>>>
>>>> Yes, the default SuperProxy queries do include reqID and when endpoints
>>>> are first enabled they are all set to 0 but after a while they change to
>>>> different values and then data seems to stop coming through to the charts.
>>>> Is there a way to account for changing reqId in setQuery? Or this there a
>>>> way to stop reqId from changing? Sorry if this is a question for the
>>>> SuperProxy forum.
>>>>
>>>>
>>>> On Thursday, 7 November 2013 16:32:34 UTC, asgallant wrote:
>>>>>
>>>>> "reqId" is important only if the client sends a "reqId" to the server
>>>>> when making a query. I don't know if the default queries contain a reqId
>>>>> or not, but I would assume so. If the client sends a reqId, the server
>>>>> is
>>>>> required to send the same reqId back, per the documentation for
>>>>> implementing data
>>>>> source<https://developers.google.com/chart/interactive/docs/dev/implementing_data_source#jsondatatable>
>>>>> .
>>>>>
>>>>> On Thursday, November 7, 2013 11:21:32 AM UTC-5, Sylwia Kowalczuk
>>>>> wrote:
>>>>>>
>>>>>> Suspecting that it has something to do with 'reqID' not being equal
>>>>>> to 0 I disabled and enabled the public endpoint. After doing that it
>>>>>> reset
>>>>>> to 0 and the code worked but it's an issue because 'reqID' just randomly
>>>>>> changes after a while.
>>>>>>
>>>>>> On Thursday, 7 November 2013 16:16:31 UTC, Sylwia Kowalczuk wrote:
>>>>>>>
>>>>>>> Unfortunately it doesn't work (I added the closing bracket)... Are
>>>>>>> there any other ways to change the labels?
>>>>>>>
>>>>>>> Maybe this will help. See below the data that is behind the data
>>>>>>> source url:
>>>>>>>
>>>>>>> google.visualization.Query.setResponse({"status":"ok","table":{"rows":[{"c":[{"v":"43.58946569849355"}]}],"cols":[{"type":"string","id":"ga:visitBounceRate","label":"ga:visitBounceRate"}]},"reqId":"8","version":"0.6"});
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thursday, 7 November 2013 15:49:48 UTC, asgallant wrote:
>>>>>>>>
>>>>>>>> The code you just posted should work. The only thing I see missing
>>>>>>>> is a closing "}" for the "drawVisualization" function.
>>>>>>>>
>>>>>>>> On Thursday, November 7, 2013 5:12:05 AM UTC-5, Sylwia Kowalczuk
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Thanks for this. It makes sense but I'm now back to square one. So
>>>>>>>>> the data comes through but the label remain unchanged. Is there any
>>>>>>>>> reason
>>>>>>>>> why the below code (suggested in other topic) doesn't work?
>>>>>>>>>
>>>>>>>>> <script type="text/javascript"
>>>>>>>>> src='https://www.google.com/jsapi?autoload={
>>>>>>>>> "modules":[{"name":"visualization","version":"1"}]}'>
>>>>>>>>> </script>
>>>>>>>>> <script type="text/javascript">
>>>>>>>>> google.setOnLoadCallback(drawVisualization);
>>>>>>>>>
>>>>>>>>> function drawVisualization () {
>>>>>>>>> var query = new google.visualization.Query('
>>>>>>>>> https://my-app.appspot.com/query?id=gesgresgesrhgrshty&format=data-table-response'
>>>>>>>>> );
>>>>>>>>> query.send(function (response) {
>>>>>>>>> var data = response.getDataTable();
>>>>>>>>>
>>>>>>>>> data.setColumnLabel(0, 'Dimension 1');
>>>>>>>>>
>>>>>>>>> var Wrapper = new google.visualization.ChartWrapper({
>>>>>>>>> 'containerId': 'bounce',
>>>>>>>>> 'dataTable': data,
>>>>>>>>> 'chartType': 'Table',
>>>>>>>>> 'options': {'width': '630px'}
>>>>>>>>> });
>>>>>>>>> Wrapper.draw();
>>>>>>>>> });
>>>>>>>>> </script>
>>>>>>>>> </head>
>>>>>>>>> <body>
>>>>>>>>> <table align="center">
>>>>>>>>> <tr valign="center">
>>>>>>>>> <tr>
>>>>>>>>> <td style='width: 50%;'>
>>>>>>>>> <div id="bounce" style="height: 80px; width:
>>>>>>>>> 90px;"></div>
>>>>>>>>> </td>
>>>>>>>>> </tr>
>>>>>>>>> </body>
>>>>>>>>>
>>>>>>>>> On Wednesday, 6 November 2013 18:45:28 UTC, asgallant wrote:
>>>>>>>>>>
>>>>>>>>>> If you set the view.columns parameter like that, your columns
>>>>>>>>>> will not contain any data. Add in "column: <column index>" to each
>>>>>>>>>> column
>>>>>>>>>> description, eg:
>>>>>>>>>>
>>>>>>>>>> {'id': 'ga:pageTitle','type':'string','label': 'Users', 'column':
>>>>>>>>>> 0}
>>>>>>>>>>
>>>>>>>>>> On Wednesday, November 6, 2013 11:46:17 AM UTC-5, Sylwia
>>>>>>>>>> Kowalczuk wrote:
>>>>>>>>>>>
>>>>>>>>>>> I'm trying to change the labels of the Google Charts table. I'm
>>>>>>>>>>> accessing my data using the Google Superproxy. The method outlined
>>>>>>>>>>> *here*<https://groups.google.com/forum/#!topic/google-visualization-api/aG72HmfNO98>doesn't
>>>>>>>>>>> seem to work for me. See my code below. It changes the table
>>>>>>>>>>> column
>>>>>>>>>>> headers but then the data does appear in rows.
>>>>>>>>>>>
>>>>>>>>>>> Any suggestions would be appreciated!
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> <script type="text/javascript"
>>>>>>>>>>> src='https://www.google.com/jsapi?autoload={
>>>>>>>>>>> "modules":[{"name":"visualization","version":"1"}]}'>
>>>>>>>>>>> </script>
>>>>>>>>>>> <script type="text/javascript">
>>>>>>>>>>> google.setOnLoadCallback(drawVisualization);
>>>>>>>>>>>
>>>>>>>>>>> function drawVisualization() {
>>>>>>>>>>> var pop = new google.visualization.ChartWrapper({
>>>>>>>>>>> 'chartType':'Table',
>>>>>>>>>>> 'dataSourceUrl':'
>>>>>>>>>>> myapp.appspot.com/query?id=grdgregerge&format=data-table-response
>>>>>>>>>>> ',
>>>>>>>>>>> 'containerId':'users',
>>>>>>>>>>> 'options': {'title':'Most Popular Users',
>>>>>>>>>>> 'legend':'none'},
>>>>>>>>>>> 'view': {'columns': [{'id':
>>>>>>>>>>> 'ga:pageTitle','type':'string','label': 'Users'}, {'id':
>>>>>>>>>>> 'ga:pageviews',
>>>>>>>>>>> 'type': 'string', 'label': 'Pageviews'}]
>>>>>>>>>>> }
>>>>>>>>>>> });
>>>>>>>>>>> pop.draw();
>>>>>>>>>>>
>>>>>>>>>>> </script>
>>>>>>>>>>> </head>
>>>>>>>>>>> <body>
>>>>>>>>>>> <table align="center" style="height: 1200px; width: 700px;">
>>>>>>>>>>> <tr valign="center">
>>>>>>>>>>> <tr>
>>>>>>>>>>> <td style='width: 40%;'>
>>>>>>>>>>> <div id="users" style="height: 400px; width: 300px;"
>>>>>>>>>>> align='middle'></div>
>>>>>>>>>>> </td>
>>>>>>>>>>> </tr>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.