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.