Skip to content

Commit eaf671e

Browse files
committed
REF: Bokeh 3.0 figure no longer takes x_range=None as fallback
1 parent 3fcb4ac commit eaf671e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

backtesting/_plotting.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ def plot(*, results: pd.Series,
220220

221221
pad = (index[-1] - index[0]) / 20
222222

223-
fig_ohlc = new_bokeh_figure(
224-
x_range=Range1d(index[0], index[-1],
225-
min_interval=10,
226-
bounds=(index[0] - pad,
227-
index[-1] + pad)) if index.size > 1 else None)
223+
_kwargs = dict(x_range=Range1d(index[0], index[-1],
224+
min_interval=10,
225+
bounds=(index[0] - pad,
226+
index[-1] + pad))) if index.size > 1 else {}
227+
fig_ohlc = new_bokeh_figure(**_kwargs)
228228
figs_above_ohlc, figs_below_ohlc = [], []
229229

230230
source = ColumnDataSource(df)

0 commit comments

Comments
 (0)