The documentation needs a lot of work; ChartWrappers are just one of a 
number of insufficiently documented features.  The ChartWrapper constructor 
takes an object with the parameters "containerId" (the id of the container 
to put the chart in), "chartType" (the type of chart to draw), "dataTable" 
(the DataTable or DataView object to use to draw the chart, leave out when 
using a Dashboard), "dataSourceUrl" (a url to query if using a remote data 
source), "options" (an object of options for the chart), "state" (an object 
describing the initial state of the chart), and "view" (an object 
describing the DataView to use when drawing the chart).

The "view" parameter takes an object with "rows" (an array of row indices 
to use when drawing the chart, analogous to the 
DataView#setRows<https://developers.google.com/chart/interactive/docs/reference#DataView_setRows>method)
 and "columns" (an array of column indices or objects to use when 
drawing the chart, analogous to the 
DataView#setColumns<https://developers.google.com/chart/interactive/docs/reference#DataView_setColumns>method)
 parameters.

On Sunday, March 31, 2013 10:28:01 AM UTC-4, Brian Duffey wrote:
>
> Thank you very much.  I did know about the binding portion but could not 
> find anywhere regarding the view parameter.  Do you have a link to any 
> documentation on this parm?  It seems to me that the documentation is a bit 
> scattered and I was looking all last night for a parm just like that 
> without success.  Thanks again!
>
> On Sunday, March 31, 2013 12:16:56 AM UTC-5, asgallant wrote:
>>
>> You can set the "view" parameter in the LineChart's chart wrapper to use 
>> only columns 0 and 1, which solves your problem.
>>
>> var chart = new google.visualization.ChartWrapper({
>>     chartType: 'LineChart',
>>     containerId: 'chart_div',
>>     options: {
>>         // chart options
>>     },
>>     view: {
>>         columns: [0, 1]
>>     }
>> });
>>
>> Bind both controls to both the chart and table like this:
>>
>> dashboard.bind([rangeControl, stringControl], [chart, table]);
>>
>> On Saturday, March 30, 2013 11:43:28 PM UTC-4, Brian Duffey wrote:
>>>
>>> I have a dashboard where I am displaying a table and a linechart.  The 
>>> table has a stringfilter and the linechart has a rangefilter control.  The 
>>> issue is that the data table has three columns, date, number and 
>>> description (string).  The data table works great but the linechart fails 
>>> unless I create a new view of only the first two columns since it tries to 
>>> graph the string column.  This is OK, however I need the two controls to 
>>> affect both objects (i.e. typing a string in filters the table and the 
>>> graph, or selecting a range filters the table and the graph).  There 
>>> doesn't seem to be a way to do this since I cannot set an option for which 
>>> columns to graph, or set up two sources in the dashboard.
>>>
>>> The real project is actually twice as big as this, but if I can get this 
>>> half going, the other half should be fine.  Here is a jsfiddle of a 
>>> simplified version:
>>> http://jsfiddle.net/duffmaster33/k8TGx/
>>>
>>> Thanks in advance.
>>>
>>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to