setColumnProperties Syntax?

1,966 views
Skip to first unread message

Ken Burkhalter

unread,
Dec 8, 2014, 9:49:37 AM12/8/14
to google-visua...@googlegroups.com
In order to use the 'certainty' feature of line chart plotting I was starting to use the following approach to set the chart DataTable properties after the input data array was converted to a data table.

   data.setColumnProperty(2, 'role', 'certainty');
   data.setColumnProperty(2, 'type', 'boolean');
   data.setColumnProperty(4, 'role', 'certainty');
   data.setColumnProperty(4, 'type', 'boolean')
   .......

Since there are a number of such columns to set, I discovered and would think that the "setColumnProperties" method would be more compact, however, despite hours of searching for documentation or examples of that approach I have been able to find virtually nothing.

Can someone provide a syntax example of how the above multiple individual column properties can be combined using the setColumnProperties approach?

Thanks.  :-)

Sergey Grabkovsky

unread,
Dec 8, 2014, 10:00:58 AM12/8/14
to google-visua...@googlegroups.com
Hi Ken,

setColumnProperties should be used to set multiple properties of a single column, and as such will not work for your case, since 'type' is not a property. You may find the documentation for setColumnProperties here: https://developers.google.com/chart/interactive/docs/reference#DataTable_setColumnProperties

An example might be:
data.setColumnProperties(3, {role: 'tooltip', html: true});

Keep in mind that this method overrides all the properties that you have set previously.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages