Files
fn_registry/cpp/functions/viz/kpi_card.h
T
egutierrez 0bdf35a461 feat: add C++ ImGui functions for core UI and visualization
Funciones C++/ImGui para dashboards (grid, panel, docking, sidebar, tabs),
visualizaciones (candlestick, gauge, histogram, pie, sparkline, heatmap,
scatter, line, bar, surface3d, kpi, table), grafos (force layout, renderer,
viewport, spatial hash, types) y utilidades (time series buffer, tracy zones,
memory/fps overlay, plot theme).

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

17 lines
508 B
C

#pragma once
// KPI card — displays a key metric with trend.
// Usage:
// float history[] = {10, 12, 11, 15, 18, 17, 20};
// kpi_card("Revenue", 20000.0f, 12.5f, history, 7, "$%.0f");
//
// Shows:
// - Label (small, muted)
// - Value (large font)
// - Delta badge (green up / red 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");