OK I'm closer with help from another thread but I need to make an
object literal from the two arrays:

var col_labels = []

                for (var i = 0; i < data.getNumberOfColumns(); i++) {
                        propertyName = data.getColumnLabel(col).split(' 
').join('');
                        cols[i] = propertyName;
                }

var col_ids = []

                for (var i = 0; i < data.getNumberOfColumns(); i++) {
                        propertyId = data.getColumnId(col).split(' ').join('');
                        cols[i] = propertyId;
                }


On Mar 15, 12:25 pm, Len De Groot <[email protected]> wrote:
> Hi,
>
> Recent changes to the API broke one of my apps. Of course it's my
> fault because I was doing something that wasn't supported, but that's
> another story.
>
> This used to work:
>
> function handleQueryResponse(response) {
>         // Validation removed - we should always be working with a
> valid spreadsheet at this point.
>
>         var data = response.getDataTable();
>         var colNum = data.getNumberOfColumns();
>
>         // All columns into an "orig_cols" map (object literal)
>         orig_cols = {};
>         for (var i = 0; i < colNum; i++) {
>             var key = data.B[i].id;
>             orig_cols[key] = {
>                 label: data.B[i].label
>             };
>         }
>
> With the changes, B is no longer recognized. So I'm trying
> (unsuccessfully) to use the API "properly."
>
> var colNum = data.getNumberOfColumns();
>
> var col_labels = {};
>         for (var i = 0; i < colNum; i++) {
>             var col_labels = {data.getColumnLabel([i])};
>             }
>
> Any help would be greatly appreciated.

-- 
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