0bdf35a461
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>
17 lines
508 B
C
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");
|