endstone.metrics.charts.simple_pie

Classes

NameDescription
SimplePie

classSimplePie

Bases: CustomChart

SimplePie(chart_id: str, get_value: Callable[[], str | None])

Parameters

NameTypeDescriptionDefault
chart_idstr

The id of the chart.

required
get_valueCallable[[], str | None]

The callable which is used to request the chart data.

required

Methods

NameDescription
get_chart_data

Gets the data for the simple pie chart.

Attributes

NameTypeDescription
get_value

attrget_value

get_value

methget_chart_data

get_chart_data() -> dict | None

Gets the data for the simple pie chart.

Returns

TypeDescription
dict | None

dict | None: A dictionary with the chart data.

On this page