Chart
class Chart()
Represents a chart with metadata from matplotlib.
Attributes:
type
ChartType - The type of charttitle
str - The title of the chartelements
List[Any] - The elements of the chartpng
Optional[str] - The PNG representation of the chart encoded in base64
ChartType
class ChartType(str, Enum)
Chart types
Enum Members:
LINE
(“line”)SCATTER
(“scatter”)BAR
(“bar”)PIE
(“pie”)BOX_AND_WHISKER
(“box_and_whisker”)COMPOSITE_CHART
(“composite_chart”)UNKNOWN
(“unknown”)
Chart2D
class Chart2D(Chart)
Represents a 2D chart with metadata.
Attributes:
x_label
Optional[str] - The label of the x-axisy_label
Optional[str] - The label of the y-axis
PointData
class PointData()
Represents a point in a 2D chart.
Attributes:
label
str - The label of the pointpoints
List[Tuple[Union[str, float], Union[str, float]]] - The points of the chart
PointChart
class PointChart(Chart2D)
Represents a point chart with metadata.
Attributes:
x_ticks
List[Union[str, float]] - The ticks of the x-axisx_tick_labels
List[str] - The labels of the x-axisx_scale
str - The scale of the x-axisy_ticks
List[Union[str, float]] - The ticks of the y-axisy_tick_labels
List[str] - The labels of the y-axisy_scale
str - The scale of the y-axiselements
List[PointData] - The points of the chart
LineChart
class LineChart(PointChart)
Represents a line chart with metadata.
Attributes:
type
ChartType - The type of chart
ScatterChart
class ScatterChart(PointChart)
Represents a scatter chart with metadata.
Attributes:
type
ChartType - The type of chart
BarData
class BarData()
Represents a bar in a bar chart.
Attributes:
label
str - The label of the bargroup
str - The group of the barvalue
str - The value of the bar
BarChart
class BarChart(Chart2D)
Represents a bar chart with metadata.
Attributes:
type
ChartType - The type of chartelements
List[BarData] - The bars of the chart
PieData
class PieData()
Represents a pie slice in a pie chart.
Attributes:
label
str - The label of the pie sliceangle
float - The angle of the pie sliceradius
float - The radius of the pie sliceautopct
float - The autopct value of the pie slice
PieChart
class PieChart(Chart)
Represents a pie chart with metadata.
Attributes:
type
ChartType - The type of chartelements
List[PieData] - The pie slices of the chart
BoxAndWhiskerData
class BoxAndWhiskerData()
Represents a box and whisker in a box and whisker chart.
Attributes:
label
str - The label of the box and whiskermin
float - The minimum value of the box and whiskerfirst_quartile
float - The first quartile of the box and whiskermedian
float - The median of the box and whiskerthird_quartile
float - The third quartile of the box and whiskermax
float - The maximum value of the box and whiskeroutliers
List[float] - The outliers of the box and whisker
BoxAndWhiskerChart
class BoxAndWhiskerChart(Chart2D)
Represents a box and whisker chart with metadata.
Attributes:
type
ChartType - The type of chartelements
List[BoxAndWhiskerData] - The box and whiskers of the chart
CompositeChart
class CompositeChart(Chart)
Represents a composite chart with metadata. A composite chart is a chart that contains multiple charts (subplots).
Attributes:
type
ChartType - The type of chartelements
List[Chart] - The charts (subplots) of the composite chart