Re: insertColumn VS addColumn VS insertColumnAfter

81 views
Skip to first unread message

asgallant

unread,
Sep 9, 2012, 10:00:43 PM9/9/12
to google-visua...@googlegroups.com
The #addColumn method appends the column to the end of the table automatically.  Much like a SQL database, inserting a new column somewhere in the middle of the table is, at best, going to be resource intensive.  Plus, with DataViews available, there is virtually no reason to care about the order of the columns in a DataTable (beyond knowing which is which).  I would avoid using #insertColumn and stick with #addColumn.  The third one (insertColumnAfter) doesn't exist.

On Sunday, September 9, 2012 6:48:17 AM UTC-4, Cristiano Maia wrote:
What are the differences between this three methods to add a new column?



data.insertColumnAfter(3, 'number', 'heading');  // does not work.  Object #<U> has no method 'insertColumnAfter' 

What would be the best way to add a new column to the END of the table with values for just some specific rows?
Reply all
Reply to author
Forward
0 new messages