Ya I mean the data to be displayed should be interdependent. So value
selection in one should change the data in another
Ragini
On Thursday, 21 November 2013 13:22:20 UTC-5, asgallant wrote:
>
> If you bind the controls, when you change the range on one control, it
> changes the *data* that the other control sees, not its range. Use
> "statechange" event handlers to coordinate them instead:
>
> google.visualization.events.addListener(slider1, 'statechange', function
> () {
> slider2.setState(slider1.getState());
> slider2.draw();
> });
> google.visualization.events.addListener(slider2, 'statechange', function
> () {
> slider1.setState(slider2.getState());
> slider1.draw();
> });
>
> On Thursday, November 21, 2013 11:39:19 AM UTC-5, Ragini Pandey wrote:
>>
>> Hi,
>>
>> I have two range sliders which I want to bind to each other so that when
>> I slide slider1 slider 2 value gets updated and vice versa. But vice versa
>> is not working it complains that it will initiate dependency cycle.
>> Is there a way to accomplice that.
>>
>> var dashboard = new
>> google.visualization.Dashboard(document.getElementById('dashboard_div'));
>> // Define a category picker for the 'Go Name'
>> column.
>> var slider1 = new
>> google.visualization.ControlWrapper({
>> 'controlType': 'NumberRangeFilter',
>> 'containerId': 'slider_gene_div',
>> 'options': {
>> 'filterColumnLabel': 'Gene Id',
>> 'ui': {'labelStacking': 'vertical'}
>> }
>> });
>>
>> var slider2 = new
>> google.visualization.ControlWrapper({
>> 'controlType': 'NumberRangeFilter',
>> 'containerId': 'slider_range_div',
>> 'options': {
>> 'filterColumnLabel': 'Position',
>> 'ui': {'labelStacking': 'vertical'}
>> }
>> });
>>
>> dashboard.bind(slider1,slider2).bind(slider2,slider1);
>>
>
--
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.