Thank you!

I was aware of the loop error, but the "declare an inline function as a 
paramater and pass the table ID to it and then pass it in to the callback" 
trick totally lost me. This is an invaluable, albeit a bit cryptic, example 
that I was able to get working on my real example.

Thanks again!

Jeff

On Friday, September 21, 2012 8:17:19 AM UTC-7, asgallant wrote:
>
> You almost had it, but there were a couple things you needed to fix:
>
> 1) you were looping over 5 characters when the string length is 4, so the 
> last iteration would throw an error.
> 2) every iteration, you would put the output in the same div ("table"), so 
> no matter how many queries were successful, each one would overwrite the 
> results of the previous one.
>
> The first is easy to fix - just base to loop length on the string length 
> instead of a fixed value.
>
> The second takes a bit of code reorganization, as you have to pass some 
> value that allows the drawing code to know which div to stick the results 
> in.  Here's one way to approach the problem: 
> http://jsfiddle.net/asgallant/az3wB/
>
> On Friday, September 21, 2012 1:18:55 AM UTC-4, Jeff Bean wrote:
>>
>> So I have a spreadsheet:
>>
>>
>> https://docs.google.com/spreadsheet/ccc?key=0AowPbANxu0u2dGJFNXJhNVhLLTNSVlRtMGJGWXQxQVE
>>
>> I'd like to use the visualization API to auto-generate a document as 
>> follows:
>>
>> For each column myCol on the page, create a list L
>>  For each row R
>>    include the value from column A if myCol, R is set to X.
>>
>> You'd think this would be easy but I'm having a hard time. I can generate 
>> one list for one column, but I can't loop through and generate all the 
>> lists on the same page. 
>>
>> My broken code is attached. Any ideas?
>>
>> Jeff
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/4wHuJUYd_fAJ.
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