Files
fn_registry/cpp/functions/viz/kpi_card.h
T
egutierrez b093c898a8 docs(issues): marcar 0025 y 0026 como completados + WIP master
Wave 1 de parallel-fix-issues integrada a master:
- 0025: text_editor_cpp_core + file_watcher_cpp_core
- 0026: gl_texture_load_cpp_gfx (vendor: stb_image v2.30)

Ademas se commitea WIP previo de master que estaba sin commitear (cambios
en shaders_lab, dag_*, framework, tokens, kpi_card, gl_loader.md, etc.)
para dejar HEAD buildable.

Notas:
- Algunos deps del gallery (button.cpp, toolbar.cpp, modal_dialog.cpp...)
  siguen UNTRACKED — gating con FN_BUILD_GALLERY=ON (default OFF) para
  que master build (sin flag) no los necesite.
- Build OK con y sin flag. fn index registra 904 functions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:14:15 +02:00

19 lines
661 B
C

#pragma once
// KPI card — displays a key metric with trend.
// Usage:
// #include "core/icons_tabler.h"
// float history[] = {10, 12, 11, 15, 18, 17, 20};
// kpi_card("Revenue", 20000.0f, 12.5f, history, 7, "$%.0f", TI_CASH);
//
// Shows:
// - Optional icon (Tabler glyph) + label (small, muted) on top row
// - Value (large font)
// - Delta badge (green TI_TRENDING_UP / red TI_TRENDING_DOWN)
// - Sparkline of history
void kpi_card(const char* label, float value, float delta_percent,
const float* history = nullptr, int history_count = 0,
const char* format = "%.1f",
const char* icon = nullptr);