Thanks for your answers! However I still have a problem with the groupWidth 
option.. The chart.getDataTable.getNumberOfRows() statement returns Object 
function (){return this.n} has no method 'getNumberOfRows' I tried to 
several alternative ways to get the number of rows for the current 
selection of the DateRangeFilter but without any success.

On Monday, April 7, 2014 4:10:19 PM UTC-4, asgallant wrote:
>
> Use a "statechange" event handler on the date filter to check how many 
> rows of data are in the filtered set, and change the bar.groupWidth option 
> if the number is below 12:
>
> google.visualization.events.addListener(dateFilter, 'statechange', 
> function () {
>     var rowCount = chart.getDataTable.getNumberOfRows();
>     if (rowCount < 12) {
>         chart.setOption('bar.groupWidth', 15);
>     }
>     else {
>         chart.setOption('bar.groupWidth', '90%');
>     }
>     chart.draw();
> });
>
> The Visualization API loads with the browser's locale by default, so 
> whatever your users have set is what loads.  You can force a particular 
> locale by specifying the "language" parameter in the google.load call. 
>  This can only be done when the API is first loaded - you can't change 
> locale without reloading the page.  See the 
> documenation<https://developers.google.com/chart/interactive/docs/library_loading_enhancements#loadwithlocale>for
>  details.
>
> The width of the DateRangeFilter is not configurable.  You can submit a 
> feature 
> request<http://code.google.com/p/google-visualization-api-issues/issues/list>to
>  add support for that.
>
>

-- 
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/d/optout.

Reply via email to