Legend
Legend
- class pinout.components.legend.Legend(data, max_height=None, **kwargs)
Auto generate a legend component
Note: pinout does not calculate text widths. A manually provided width may be required to ensure text remains enclosed within the legend.
- Parameters
data ([type]) – [description]
max_height ([type], optional) – [description], defaults to None
Swatch
- class pinout.components.legend.Swatch(width=None, height=None, **kwargs)
Graphical icon for display in LegendEntry
- Parameters
width (int, optional) – Width of swatch, defaults to None
height (int, optional) – Height of swatch, defaults to None
Entry
- class pinout.components.legend.LegendEntry(content, width=None, height=None, swatch=None, **kwargs)
Legend entry comprised of a swatch and single line of text.
The swatch attribute accepts either a dictionary of Swatch attributes or a Swatch instance. Swatch styling (ie filling with color) is done via CSS and should reference the LegendEntry class(es).
- Parameters
content ([type]) – Text displayed in entry
width (int, optional) – Width of entry, defaults to None
height (int, optional) – height of entry, defaults to None
swatch (dict or Swatch, optional) – Graphical icon included in entry, defaults to None