Files
fn_registry/cpp/functions/viz/line_plot.h
T
egutierrez 7eb7b3d0c8 chore: snapshot WIP previo + flow 0008 + 7 sub-issues (0112-0119)
Snapshot de WIP acumulado de sesiones previas antes de merge wave 1
del flow 0008 (kanban_cpp + agent_runner_api + DoD schema).

Incluye:
- dev/flows/0008-kanban-cpp-and-agent-workflows.md
- dev/issues/0112-0119*.md (7 sub-issues)
- WIP previo en cmd/fn/doctor.go, registry/*, modules/, cpp/, etc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 18:17:08 +02:00

28 lines
1.5 KiB
C

#pragma once
// Renders a 2D line plot using ImPlot con ejes pineados (ver viz/plot_static.h).
// Call within an ImGui frame (inside fn::run_app render callback).
// height > 0: altura del plot en pixeles (default 200) — explicita para
// evitar feedback loops con contenedores AutoResizeY.
void line_plot(const char* title, const float* xs, const float* ys, int count,
float height = 200.0f);
void line_plot(const char* title, const double* xs, const double* ys, int count,
float height = 200.0f);
// Fixed Y-range overloads — pinea Y a [y_min, y_max] para series con dominio
// conocido (ej. 0-100 en CPU%/RAM%). v1.2.
void line_plot(const char* title, const float* xs, const float* ys, int count,
float y_min, float y_max, float height = 200.0f);
void line_plot(const char* title, const double* xs, const double* ys, int count,
double y_min, double y_max, float height = 200.0f);
// Fixed XY-range overloads — pinea BOTH X y Y. Util para ventanas temporales
// fijas (ej. ultimos 5 min de CPU%): xs en [0, WINDOW] y ys en [0, 100]. El
// plot NO se aplasta al variar count. v1.3.
void line_plot(const char* title, const float* xs, const float* ys, int count,
float x_min, float x_max, float y_min, float y_max,
float height = 200.0f);
void line_plot(const char* title, const double* xs, const double* ys, int count,
double x_min, double x_max, double y_min, double y_max,
float height = 200.0f);