-
First of all, thanks a lot for this awesome library. It is really a game changer. I'm interested in saving the bokeh plot generated and display it on my dash app for different runs. So, I have couple of questions: How can I save the bokeh plot and load it in my dash app? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
When in doubt, just look in the source. backtesting.py/backtesting/_plotting.py Lines 659 to 668 in 94d20da which you can then load as HTML or maybe as an image. Best look to Dash documentation/community for how to do that? |
Beta Was this translation helpful? Give feedback.
-
As you may know, dash is natively used with plotly. There are workarounds for what you ask but none of them seems perfect. If you insist on bokeh (as I do) I highly recommend you to consider switching panel or streamlit or write another plot function that uses plotly. |
Beta Was this translation helpful? Give feedback.
When in doubt, just look in the source.
Backtest.plot()
returns a Bokeh Figure object:backtesting.py/backtesting/_plotting.py
Lines 659 to 668 in 94d20da
which you can then load as HTML or maybe as an image. Best look to Dash documentation/community for how to do that?