Class endstone::DrilldownPie¶
ClassList > endstone > DrilldownPie
A bStats pie chart with grouped named values.
#include <endstone/metrics/drilldown_pie.h>
Inherits the following classes: endstone::CustomChart
Public Types¶
| Type | Name |
|---|---|
| typedef std::function< std::optional< std::unordered_map< std::string, std::unordered_map< std::string, int > > >()> | Callback |
Public Functions¶
| Type | Name |
|---|---|
| DrilldownPie (std::string chart_id, Callback get_values) |
|
| virtual std::optional< JsonObject > | getChartData () override Gets the data for this chart. |
Public Functions inherited from endstone::CustomChart¶
| Type | Name |
|---|---|
| CustomChart (std::string chart_id) Creates a chart with the given bStats chart id. |
|
| CustomChart (const CustomChart &) = delete |
|
| CustomChart (CustomChart &&) = delete |
|
| virtual std::optional< JsonObject > | getChartData () = 0 Gets the data for this chart. |
| const std::string & | getChartId () noexcept const Gets the id of this chart. |
| CustomChart & | operator= (const CustomChart &) = delete |
| CustomChart & | operator= (CustomChart &&) = delete |
| virtual | ~CustomChart () = default |
Public Types Documentation¶
typedef Callback¶
using endstone::DrilldownPie::Callback = std::function<std::optional<std::unordered_map<std::string, std::unordered_map<std::string, int> >>()>;
Public Functions Documentation¶
function DrilldownPie¶
function getChartData¶
Gets the data for this chart.
This is called on the primary server thread. Returning no value omits the chart from the submission.
Returns:
the chart data, or no value to skip this chart
Implements endstone::CustomChart::getChartData
The documentation for this class was generated from the following file include/endstone/metrics/drilldown_pie.h