Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Callback/Rangeslider

$
0
0

@Bill_M wrote:

Is there a way to trigger a callback only when a RangeSlider is moved?

Background: I have a range slider in a div with a datatable. I would like to use that range slider to update both the table and some bar/scatter plots in other divs. I have most of this working with the following code:

@app.callback(Output('bar-graph','children'),
                [Input('range_slider','value')])
def update_bar(slider_range):
         things get updated

The problem I am having is that the interactive controls on the plots in other divs become unusable as the callback is continually triggered. I think I could use a button to trigger, but space is at a premium, and the user interface would be better if it just worked off the slider.

I am looking for something like:

@app.callback(Output('bar-graph','children'),
                [Input('submit-button','nclicks')],
                [State('number-in', 'value')]
def update_bar(slider_range):

but I can’t seem to find the property similar to nclicks.

Thanks

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles