highlight_number
Documentation for eth_defi.vault_report.charts.highlight_number function.
- highlight_number(text, theme, value=None)
Wrap a number in a legend label in bold and an accent colour, so it stands out from the text.
Chrome draws the
<b>text in the bundled semibold weight. Used for the returns, Sharpe ratios and TVL amounts in legends and label columns.- Parameters
text (str) – Formatted number, e.g.
+22.6%or$5.5B.theme (eth_defi.vault_report.theme.ChartTheme) – Chart theme.
value (Optional[float]) – Signed value for returns: negative values are red, others green.
Nonefor amounts, which are green.
- Returns
Plotly HTML.
- Return type