DataElementDecorator
- class qf_lib.plotting.decorators.data_element_decorator.DataElementDecorator(data_container: object, key: Optional[str] = None, use_secondary_axes: bool = False, **plot_settings: Any)[source]
Bases:
ChartDecorator
,SimpleLegendItem
Wrapper for main data element used by a certain type of Chart. It stores the data container, plot settings and a handle for matplotlib’s element representing the charted data (curve in LineChart, bars in BarChart etc.).
- Parameters:
data_container (object) – container for the data to be charted (its type depends on the type of the chart)
key (str) – Key is the identifier of the data element. It must be unique to each data element across the chart.
use_secondary_axes (bool) – Whether this data element should be plotted on the secondary axis.
plot_settings (Any) – Additional settings for plotting the data element.
Methods:
decorate
(chart)Modifies the axes object taken from the chart (e.g.