Added getters for graphs ymin and ymax (#8112)

Co-authored-by: guillempages <guillempages@users.noreply.github.com>
This commit is contained in:
Mikkel Jeppesen
2025-03-15 06:55:20 +01:00
committed by GitHub
parent 7679c716b3
commit fa25cebed5
2 changed files with 8 additions and 0 deletions

View File

@@ -132,6 +132,10 @@ void Graph::draw(Display *buff, uint16_t x_offset, uint16_t y_offset, Color colo
yrange = ymax - ymin;
}
// Store graph limts
this->graph_limit_max_ = ymax;
this->graph_limit_min_ = ymin;
/// Draw grid
if (!std::isnan(this->gridspacing_y_)) {
for (int y = yn; y <= ym; y++) {