Changing the width may not be supported, but you can change the css 
attributes to change it. You can use something like this:

                        google.visualization.events.addListener(control, 
"ready", function () {
                            var initialThumbAndHandle = desiredWidth - 18;
                            $("div 
.google-visualization-controls-slider-horizontal").css("width", 
desiredWidth);
                            var thumb1 = $("div 
.google-visualization-controls-slider-thumb").get(1);
                            $(thumb1).css("left", initialThumbAndHandle);
                            $("div 
.google-visualization-controls-slider-handle").css("width", 
initialThumbAndHandle)
                        }
                            );

On Monday, April 7, 2014 11:10:19 PM UTC+3, 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.
>
> On Monday, April 7, 2014 3:47:41 PM UTC-4, Nick wrote:
>>
>> Hi everybody,
>>
>> On my combo chart at the moment I set the bar.groupWidth option to 90% to 
>> eliminate the space between columns and it looks great as long as there is 
>> more than 12 columns. I am using a DateRangeFilter to filter through the 
>> data and if you show less than 10 columns it looks awful as the columns 
>> take way too much room on the screen. I tried to set groupWidth the a value 
>> in pixels but it doesnt look as well as 90% when you have a lot of columns.
>>
>> My first question is it possible to set a breakpoint when there is less 
>> than 12 columns and change the groupWidth to a pixel value without having 
>> to reload the webpage. I tried to do it with an if statement in javascript 
>> but I realized it was only possible with reloading the page and since the 
>> graphics is using a lot of data it takes a while..
>>
>> Second, the DateRangeFilter shows the months in English by default. My 
>> program needs to be compatible with French so would there be a way to 
>> display the months in French?
>>
>> At last, I was looking through the documentation and I didn't find any 
>> option allowing me to customize the width of the DateRangeFilter. I tried 
>> doing it with a CSS class but it didn't work. Is it possible to make the 
>> DateRangeFilter control larger?
>>
>> Thank you for your answers :)
>>
>

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