Update xrange dynamically based on a ColumnDataSource object

Hello! Is there a way to update the xaxis of a bar chart using a columndatasource object? I have a chart that updates the bars based off of what is selected, but I want the tick marks in the xaxis to only represent the values that are being displayed. So, I figured the best option would be to dynamically update the xrange as each new value is selected, similar to how the overall plot is changed based on this.

This question has been answered here: python - Bokeh Dynamically Update xrange based on a ColumnDataSource - Stack Overflow

···

On Tuesday, August 7, 2018 at 11:24:32 AM UTC-4, Zoë Cesar wrote:

Hello! Is there a way to update the xaxis of a bar chart using a columndatasource object? I have a chart that updates the bars based off of what is selected, but I want the tick marks in the xaxis to only represent the values that are being displayed. So, I figured the best option would be to dynamically update the xrange as each new value is selected, similar to how the overall plot is changed based on this.