BUG: Fix AttributeError, unexpected 'callback' to Range1d

Callback removed in Bokeh 2.0.0.
Fixes https://github.com/kernc/backtesting.py/issues/48
This commit is contained in:
Kernc
2020-03-09 18:24:33 +01:00
parent ffe2b21e64
commit 56b315037f

View File

@@ -542,8 +542,8 @@ return this.labels[index] || "";
if plot_volume:
custom_js_args.update(volume_range=fig_volume.y_range)
fig_ohlc.x_range.callback = CustomJS(args=custom_js_args,
code=_AUTOSCALE_JS_CALLBACK)
fig_ohlc.x_range.js_on_change('end', CustomJS(args=custom_js_args,
code=_AUTOSCALE_JS_CALLBACK))
plots = figs_above_ohlc + [fig_ohlc] + figs_below_ohlc
for f in plots: