MCPcopy Index your code
hub / github.com/kernc/backtesting.py / set_tooltips

Function set_tooltips

backtesting/_plotting.py:309–322  ·  view source on GitHub ↗
(fig, tooltips=(), vline=True, renderers=())

Source from the content-addressed store, hash-verified

307 return fig
308
309 def set_tooltips(fig, tooltips=(), vline=True, renderers=()):
310 tooltips = list(tooltips)
311 renderers = list(renderers)
312
313 if is_datetime_index:
314 formatters = {'@datetime': 'datetime'}
315 tooltips = [("Date", "@datetime{%c}")] + tooltips
316 else:
317 formatters = {}
318 tooltips = [("#", "@index")] + tooltips
319 fig.add_tools(HoverTool(
320 point_policy='follow_mouse',
321 renderers=renderers, formatters=formatters,
322 tooltips=tooltips, mode='vline' if vline else 'mouse'))
323
324 def _plot_equity_section(is_return=False):
325 """Equity section"""

Callers 6

_plot_equity_sectionFunction · 0.85
_plot_drawdown_sectionFunction · 0.85
_plot_pl_sectionFunction · 0.85
_plot_volume_sectionFunction · 0.85
_plot_indicatorsFunction · 0.85
plotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected