113 void set_name(
const char *name) { this->
name_ = name; }
116 enum LineType get_line_type() {
return this->line_type_; }
120 bool get_continuous() {
return this->
continuous_; }
121 void set_continuous(
bool continuous) { this->
continuous_ = continuous; }
142 void setup()
override;
StringRef is a reference to a string owned by something else.
float get_graph_limit_min()
void add_legend(GraphLegend *legend)
void set_duration(uint32_t duration)
void add_trace(GraphTrace *trace)
void set_border(bool val)
void dump_config() override
float get_graph_limit_max()
float graph_limit_min_
in pixels
void draw(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color)
std::vector< GraphTrace * > traces_
void set_grid_y(float val)
void set_grid_x(float val)
uint32_t width_
in seconds
float get_setup_priority() const override
void set_height(uint32_t height)
void draw_legend(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color)
void set_width(uint32_t width)
void set_max_range(float val)
void set_max_value(float val)
void set_min_value(float val)
void set_min_range(float val)
uint32_t height_
in pixels
void set_height(uint32_t height)
void set_values(ValuePositionType val)
display::BaseFont * font_label_
display::BaseFont * font_value_
void set_name_font(display::BaseFont *font)
void set_direction(DirectionType val)
void init(Graph *g)
Determine the best coordinates of drawing text + lines.
void set_value_font(display::BaseFont *font)
void set_width(uint32_t width)
ValuePositionType values_
void set_border(bool val)
float get_recent_min() const
float get_value(int idx) const
void set_update_time_ms(uint32_t update_time_ms)
float get_recent_max() const
void take_sample(float data)
std::vector< float > samples_
uint32_t update_time_
in ms
constexpr Color COLOR_ON(255, 255, 255, 255)
Turn the pixel ON.
static void int int int int const uint8_t int x_offset
static void int int int int const uint8_t int int y_offset
@ VALUE_POSITION_TYPE_NONE
@ VALUE_POSITION_TYPE_AUTO
@ VALUE_POSITION_TYPE_BELOW
@ VALUE_POSITION_TYPE_BESIDE
LineType
Bit pattern defines the line-type.
@ DIRECTION_TYPE_HORIZONTAL
@ DIRECTION_TYPE_VERTICAL
constexpr float PROCESSOR
For components that use data from sensors like displays.