question on slider control

54 views
Skip to first unread message

Vikas NV

unread,
Nov 7, 2012, 4:37:08 AM11/7/12
to google-visua...@googlegroups.com
Hi, I have a slider control on my page, whose min and max values are 1 and 2. I want to move the slider in steps of 0.2 but I can't get it to work with setting ui.unitIncrement = 0.2
May I know how to get around with this?
Thanks,
Vikas

asgallant

unread,
Nov 7, 2012, 11:02:20 AM11/7/12
to google-visua...@googlegroups.com
This is a known limitation of the API.  You can "star" the bug report on the issue (http://code.google.com/p/google-visualization-api-issues/issues/detail?id=861) to get updates on a fix and to let the devs know that users are particular concerned about this issue.

Vikas NV

unread,
Nov 8, 2012, 9:16:56 PM11/8/12
to google-visua...@googlegroups.com
I have starred the issue. As a work around I have done this:

1. I have put a select menu, from which users can select an option (these options are mapped to the slider controls)
2. I have text boxes for min & max for users to enter
3. Check user's entry of min & max are valid
4. I have two buttons .. 
     "redraw"->which sets the min & max for slider using setState & redraws slider
     "reset" ->which sets the min to floor of min_of_col_from_datatable & max to ceil of max_of_col_from_datatable & redraws slider
This also saves a lot of page's real estate ..

Thanks,
Vikas

Vikas NV

unread,
Nov 9, 2012, 3:20:46 AM11/9/12
to google-visua...@googlegroups.com
But still it does not work, it seems like the entered numbers in textbox get rounded off before filtering ...

asgallant

unread,
Nov 9, 2012, 3:26:18 AM11/9/12
to google-visua...@googlegroups.com
Are you trying to set the state of the slider to some non-integer value?  If so, it won't work - the sliders only use integer values.
Reply all
Reply to author
Forward
0 new messages