portfolio_toolkit.plot.bar_chart_data module

class portfolio_toolkit.plot.bar_chart_data.BarChartData(title: str, grid: bool = True, figsize: tuple = (10, 6), labels: ~typing.List[str] = <factory>, values: ~typing.List[float] = <factory>, xlabel: str = 'Categories', ylabel: str = 'Values', colors: ~typing.List[str] | None = None, horizontal: bool = False)[source]

Bases: PlotBase

Data structure for bar charts

labels: List[str]
values: List[float]
xlabel: str = 'Categories'
ylabel: str = 'Values'
colors: List[str] | None = None
horizontal: bool = False
get_plot_type() str[source]

Return the type of plot

validate() bool[source]

Validate that data is consistent

__init__(title: str, grid: bool = True, figsize: tuple = (10, 6), labels: ~typing.List[str] = <factory>, values: ~typing.List[float] = <factory>, xlabel: str = 'Categories', ylabel: str = 'Values', colors: ~typing.List[str] | None = None, horizontal: bool = False) None
title: str