Skip to content

Commit c2d504b

Browse files
made bokeh backend configurable thru scheme
1 parent 878f9a5 commit c2d504b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backtrader_plotting/bokeh/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _init_figure(self):
4646
f = figure(tools=Figure._tools,
4747
x_axis_type='linear',
4848
aspect_ratio=self._scheme.plotaspectratio,
49-
output_backend="webgl",
49+
output_backend=self._scheme.output_backend,
5050
)
5151

5252
f.y_range.range_padding = self._scheme.y_range_padding

backtrader_plotting/schemes/btscheme.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ def __init__(self):
187187
# include strategy source code in the meta data
188188
self.strategysrc = False
189189

190+
# bokeh output backend
191+
self.output_backend = 'webgl'
192+
190193
def color(self, idx):
191194
colidx = tab10_index[idx % len(tab10_index)]
192195
return self.lcolors[colidx]

0 commit comments

Comments
 (0)