That's not right, either.  Your example only shows one column.  It
should show 2:

  v.setColumns([0, {calc:myFunc,type:'string','label':'testcol'}]);

Doesn't that notation say to show column #0 in the first column and a
calculated column in the second?  Or have I misunderstood how this is
supposed to work?

Incidentally, I was able to get things working if I passed the view as
the data.  But that didn't match the documentation.



On Jun 21, 12:48 pm, Riccardo Govoni <[email protected]> wrote:
> I'm not sure what problem you're having. It works fine for me. Try this
> examplehttp://jsfiddle.net/rYRD4/1/, where the table will show only column
> 0 out of all the columns in the input datatable.
>
> Caveats:
> dataview.toJSON() does not retain generated columns, as the documentation
> says 
> (http://code.google.com/apis/chart/interactive/docs/reference.html#Dat...).
> That's why you lose your 'myFunc' column.
>
> Note that if you don't pass through toJSON(), but pass a view specification
> directly to the chartwrapper, it will use your generated columns 
> (seehttp://jsfiddle.net/rYRD4/2/) :
> w.setView({columns: [0, {calc:myFunc,type:'string','label':'testcol'}]});
>
> /R.

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