Good evening again.

Thanks for the nudge again Asgallant. have tried both those methods but had 
no luck. Have experimented and have come up with the following:

If i use this code, it moves the second column to the other axis so I know 
i am on the right track

!function () {
for (var i = 1; i < columns; i++) {
var maxRange = data.getColumnRange(i); 
if (maxRange.max > 1000) {
alert(maxRange.max); // to show me the max range has been read
alert(i);                        // to confirm the column which has a range 
above 1000
wrapper.setOption('series', {2:{targetAxisIndex : 1}}); 
};
}
}()

but I need to replace the number 2 with variable i. 
I have tried the following but nothing seems to work.

wrapper.setOption('series', { (i) :{targetAxisIndex : 1}});

wrapper.setOption('series', {  i :{targetAxisIndex : 1}});

I am trying to understand why I can not refer to variable i from within the 
curly brackets. It works for the alert above, but i am still a noob at this 
so might be missing something fundemental.

As always ever grateful for the help.

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

Reply via email to