LegendEntry
Documentation for eth_defi.vault_report.charts.LegendEntry Python class.
- class LegendEntry
Bases:
objectOne entry of a custom chart legend, see
add_logo_legend().The order of the content follows the report’s legend rule: the vault name in bold, then its return, then the curator, protocol and chain with icons.
Attributes summary
Label text as plain text; it is escaped and drawn in bold
Series colour of the swatch, any CSS colour Plotly accepts
Protocol, chain or benchmark logo data URI drawn next to the swatch, or
NonePlotly line dash style of the swatch, so dashed benchmark lines are recognisable
Muted line under the label, e.g.
Curator, protocol and chain drawn with their icons under the label
Draw the entry on one row: its logo, label and detail, e.g.
Methods summary
__init__(label, colour[, logo_uri, dash, ...])- label: str
Label text as plain text; it is escaped and drawn in bold
- colour: str
Series colour of the swatch, any CSS colour Plotly accepts
- logo_uri: Optional[str]
Protocol, chain or benchmark logo data URI drawn next to the swatch, or
None
- dash: str
Plotly line dash style of the swatch, so dashed benchmark lines are recognisable
- detail: Optional[str]
Muted line under the label, e.g. the final return. Plotly HTML that is drawn as is, so a number can be highlighted with
highlight_number(); escape any external text in it
- properties: tuple[eth_defi.vault_report.charts.VaultProperty, ...]
Curator, protocol and chain drawn with their icons under the label
- inline: bool
Draw the entry on one row: its logo, label and detail, e.g. for benchmarks, see
add_logo_legend()
- __init__(label, colour, logo_uri=None, dash='solid', detail=None, properties=(), inline=False)