endstone.metrics.charts.custom_chart

Classes

NameDescription
CustomChart

Represents a custom chart.

classCustomChart

Bases: ABC

CustomChart(chart_id: str)

Represents a custom chart.

Parameters

NameTypeDescriptionDefault
chart_idstr

The id of the chart.

required

Raises

TypeDescription
ValueError

If chart_id is None or empty.

Methods

NameDescription
get_chart_data

Gets the data for the chart.

Attributes

NameTypeDescription
chart_id

attrchart_id

chart_id

methget_chart_dataabstractmethod

get_chart_data() -> dict | None

Gets the data for the chart.

Returns

NameTypeDescription
dictdict | None

A dictionary with the chart data.

Raises

TypeDescription
Exception

If there is an error getting the chart data.

On this page