I wrote a hack that turns a CategoryFilter into a column selector: 
http://jsfiddle.net/asgallant/WaUu2/.  Will that work for you?

On Wednesday, December 18, 2013 5:03:54 AM UTC-5, Ravindra Gharge wrote:
>
> Following function create the dashboard with the give values in the data 
> object
> i want to create the ControlWrapper with the values user 1 , user 2 , 
> user 3 from the data object
> and depending on the selection of multiple/single users line on the chart 
> should plot
> please help
>
> function drawVisualization() {
>   // Prepare the data
>   var data = google.visualization.arrayToDataTable([
>     ['Year', 'sales', 'user 1', 'user 2','user 3'],
>     ['2010',  268,    24, 51,     193],
>     ['2012',  50,     0,  0,      50 ],
>     ['2013',  0,      0,  0,      0, ]
>   ]);
>
>   // Define a slider control for the Age column.
>   var slider = new google.visualization.ControlWrapper({
>     'controlType': 'NumberRangeFilter',
>     'containerId': 'control1',
>     'options': {
>       'filterColumnLabel': 'sales',
>     'ui': {'labelStacking': 'vertical'}
>     }
>   });
>
>   // Define a category picker control for the Gender column
>   var categoryPicker = new google.visualization.ControlWrapper({
>     'controlType': 'CategoryFilter',
>     'containerId': 'control2',
>     'options': {
>       'filterColumnLabel': 'Year',
>       'ui': {
>       'labelStacking': 'vertical',
>         'allowTyping': false,
>         'allowMultiple': true
>       }
>     }
>   });
>
>   // Define a Pie chart
>   var pie = new google.visualization.ChartWrapper({
>     'chartType': 'LineChart',
>     'containerId': 'chart1',
>     'options': {
>       'width': 300,
>       'height': 300,
>       'legend': 'none',
>       'title': 'Donuts eaten per person',
>       'curveType': "function"
>     },
>     // Instruct the piechart to use colums 0 (Name) and 3 (Donuts Eaten)
>     // from the 'data' DataTable.
>     
>   });
>
>   // Define a table
>   var table = new google.visualization.ChartWrapper({
>     'chartType': 'Table',
>     'containerId': 'chart2'
>
>   });
>
>   // Create a dashboard
>   new google.visualization.Dashboard(document.getElementById('dashboard'))
> .
>       // Establish bindings, declaring the both the slider and the 
> category
>       // picker will drive both charts.
>       bind([slider, categoryPicker], [pie, table]).
>       // Draw the entire dashboard.
>       draw(data);
> }
>

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