Hi ahmettemiz88,
It doesn’t look like anything in your code fragment is wrong. I worked up a little example with it to show the ‘mouseup’ callback_policy in action:
from bokeh.models import RangeSlider, CustomJS, ColumnDataSource
from bokeh.plotting import show, figure
from bokeh.layouts import column
p = figure(y_range=[0, 4])
cds = ColumnDataSource(data={
'x': [1, 2, 3, 4, 5, 6, 7, 8],
'y': [1, 2, 3, 2, 1, 2, 3, 2],
'y_2': [1, 2, 3, 2, 1, 2, 3, 2]
})
line_to_change = p.line(x='x', y='y_2', color='green', source=cds)
callback = CustomJS(args=dict(source=cds), code='''
for (i=0; i<source.data['y_2'].length; i++) {
source.data['y_2'][i] = source.data['y'][i] + this.value[0]; // lower bound from RangeSlider
};
source.change.emit();
''')
range_slider = RangeSlider(start=0.0, end=0.85, value=(0,0.85), step=0.01,
title="Deprem Tehlike Değeri", callback=callback,
callback_policy="mouseup")
col = column(p, range_slider)
show(col)
If you move the lower end of the RangeSlider, you can see that the plot updates only when you drop the slider. (It’s not listening to the top end, so moving that won’t do anything. )
If you’re still having trouble, I recommend posting a fully runnable minimal example with the behavior you’re seeing.